Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 taking refuge in the Monastery: (4)
As of 2014-09-20 01:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (151 votes), past polls