Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: C-Style Struct?

by Anonymous Monk
on Aug 08, 2012 at 18:30 UTC ( #986336=note: print w/replies, xml ) Need Help??


in reply to Re^2: C-Style Struct?
in thread C-Style Struct?

You could add accessors to the object. Like this:

sub count { my $self = shift; return $self->[0] unless @_; $self->[0] = shift; } # ... $cc->count(42); print $cc->count;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://986336]
help
Chatterbox?
LanX interesting POTUS reminds his people of brutal colonial past in the Philipines ...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2017-08-18 12:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (301 votes). Check out past polls.

    Notices?