Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: say variable in Class

by Laurent_R (Canon)
on Jun 03, 2018 at 16:32 UTC ( [id://1215785]=note: print w/replies, xml ) Need Help??


in reply to Re^2: say variable in Class
in thread [Perl6] say variable in Class

but defeats a bit the idea that the object on creation reports its status
If you want to do that, then you would probably need to create your own constructor with this added feature in it.

Or, as shown by mr_ron, you might (re)define the TWEAK submethod, which is called by the new default constructor, so that redefining TWEAK effectively modifies the behavior of new.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (1)
As of 2024-04-24 13:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found