Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: strict refs

by Krambambuli (Deacon)
on Oct 28, 2008 at 09:13 UTC ( #719942=note: print w/ replies, xml ) Need Help??


in reply to strict refs

The following works for me:

foreach (@{ $DBI::EXPORT_TAGS{sql_types} }) { my $ref = \&{"DBI::$_"}; printf "%s=%d\n", $_, &$ref; }
It is documented in strict:
There is one exception to this rule: $bar = \&{’foo’}; &$bar; is allowed so that "goto &$AUTOLOAD" would not break unde +r stricture.
Hth,

Krambambuli
---


Comment on Re: strict refs
Select or Download Code
Re^2: strict refs
by LesleyB (Friar) on Oct 28, 2008 at 09:35 UTC

    Yes, Krambabuli, it does help and it does work for me too.

    Thank you for pointing out the documentation on it

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (14)
As of 2015-07-02 21:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (45 votes), past polls