Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Paradigm Shift - Don't use strict

by blakem (Monsignor)
on Nov 13, 2001 at 00:17 UTC ( [id://124905]=note: print w/replies, xml ) Need Help??


in reply to Paradigm Shift - Don't use strict

I agree with most of your points, but handrolling your own exporter really isn't all that bad1. If you look through Exporter.pm, you'll find that most of it is just syntactic sugar around the following bit of code2 that looks remarkably similiar to what you noted:
*{"${callpkg}::$sym"} = \&{"${pkg}::$sym"}
There is also a nearly identical call for $vars and @arrays and %hashes, etc. Exporter.pm is mainly just a nicer interface for this admitedly scary chunk of code.

1Assuming you're Lincoln Stein
2From 5.005_03 since I once disected its Exporter.pm for fun

-Blake

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-16 06:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found