Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 having an uproarious good time at the Monastery: (7)
As of 2014-08-30 19:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (293 votes), past polls