Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

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

by LanX (Saint)
on Jan 03, 2021 at 23:57 UTC ( [id://11126249]=note: print w/replies, xml ) Need Help??


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

I didn't read the thread and can't comment on the discussion and motivation, but this caught my eye:

> Naming a package 0 is a fatal, compilation error:

Yeah but like many things in Perl this can be fabricated.

Packages are just entries with trailing :: in main's STASH.

And its possible to alias STASH entries via type globs.

So create a temporary package, alias it to "0::" and delete the temp package.

Mission accomplished! :)

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

PS: Please don't crucify me now ... I haven't met my Maria Magdalena yet!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-03-28 20:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found