Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: array as attributes in OO perl

by TGI (Parson)
on Nov 18, 2008 at 19:04 UTC ( [id://724352]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use Carp qw(croak);
    
    ...
    
        return @{ $this->{colour}||[] };
    }
    
  2. or download this
    sub colour {
        my $this = shift;
    ...
    
        return @{ $this->{colour}||[] };
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://724352]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-19 20:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found