Hi all,

I read some sections in perltoot. In section
Autoloaded Data Methods I see some line codes as
following:

 package Person;
        use Carp;
        our $AUTOLOAD;  # it's a package global

        my %fields = (
            name        => undef,
            age         => undef,
            peers       => undef,
        );

        sub new {
            my $class = shift;
            my $self  = {
                _permitted => \%fields,
                %fields,
            };
            bless $self, $class;
            return $self;
        }

It looks like that  _permitted => \%fields and %fields
are redundant. Could anyone explain it a little bit
more?

Thanks,

Li

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to