Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Your favorite objects NOT of the hashref phylum

by dokkeldepper (Friar)
on Mar 23, 2006 at 16:52 UTC ( [id://538796]=note: print w/replies, xml ) Need Help??


in reply to Your favorite objects NOT of the hashref phylum

For all this fixed dimension geometry stuff I use arrayrefs.
package Location; use integer; use constant X=>0; use constant Y=>1; sub new{ my($self,$x,$y)=@_; bless[$x,$y],$self; } # this part can be obviously autoloaded sub get_X{ my $self=shift; return $self->[X]; } sub get_Y{ my $self=shift; return $self->[Y]; }

Log In?
Username:
Password:

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

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

    No recent polls found