Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
The stupid question is the question not asked
 
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;


Comment on Re^3: C-Style Struct?
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2014-04-17 14:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (450 votes), past polls