Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Calling module function from within a blessed module

by shmem (Chancellor)
on Jan 02, 2021 at 16:51 UTC ( #11126149=note: print w/replies, xml ) Need Help??


in reply to Re^2: Calling module function from within a blessed module
in thread Calling module function from within a blessed module

Note that this unfortunately breaks for subclasses.

This is true. Thanks for pointing that out, so I don't have to do that ;)

The OP was really about calling syntax, and I sneaked in dual subs (method/function) and the __PACKAGE__ keyword, just to have that mentioned. Now you bring on subclassing, which is great - and a big field to tackle. Yes, the check for __PACKAGE__ is suitable for classes which aren't meant to be subclassed, won't be, or "I don't care about" modules, and more so: which strictly forbid subclassing.

Your post is right, mine wasn't wrong, and from here we can go on exploring the whole perl OO fractal landscape... ;)

perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
  • Comment on Re^3: Calling module function from within a blessed module

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2021-03-01 04:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?