Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Use case for symbolic references (was: Re^2: Referencing the locals)

by haukex (Bishop)
on Apr 28, 2021 at 21:24 UTC ( #11131826=note: print w/replies, xml ) Need Help??


in reply to Use case for symbolic references (was: Re^2: Referencing the locals)
in thread Referencing the locals

Is there ever a case to use a symbolic reference in Perl?

Two places that come to mind where I regularly write no strict 'refs'; is dynamic method/function generation (example 1, example 2) and implementations of import (example 1, example 2, at the bottom of each node). Other than those legitimate uses, there's interaction with legacy code (example 1, example 2). Note how in each of those examples the scope of the no strict is limited to be as small as possible.

Update: Added more links to examples.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2021-07-27 14:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?