| Revision 1 (by moose, 2006/07/20 11:34:56) |
|---|
#!/usr/bin/perl package Test; use base Tie::Hash; sub new { my $class = shift; my %parms = @_; my $self = {%parms}; tie %$self, $class, @_; return %$self; } package main; my %test = new Test(foo => 'bar'); print "foo: $test{foo}\n"; $test{foo} = '123'; print "foo: $test{foo}\n";