Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: strict refs

by Krambambuli (Curate)
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
---

Replies are listed 'Best First'.
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2016-12-03 18:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (56 votes). Check out past polls.