Here is a basic attribute definition from an O'Reilly Book:

sub new {

        my $invocant = shift;
        my $class = ref($invocant) || $invocant;
        my $self = {
                   color => "bay",
                   legs => 4,
                   @_ ,
        };
        return bless $self,$class;

}

What I do not understand is why $self is not defined as a hash %self. Also, 
if you were to only include @_, would you need a comma after it -- in other 
words
my $self = {@_}; or {@_,};
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Reply via email to