Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Exporting use strict/warnings into main::

by haj (Curate)
on May 15, 2020 at 16:01 UTC ( #11116820=note: print w/replies, xml ) Need Help??


in reply to Exporting use strict/warnings into main::

So you want to export your own symbols, using Exporter's import capabilities and strict/warnings... In that case, you should not import Exporter's import method, but roll out your own - and call the original afterwards, like this:
use Exporter; sub import { strict->import; warnings->import; goto &Exporter::import; }

Replies are listed 'Best First'.
Re^2: Exporting use strict/warnings into main::
by nysus (Parson) on May 15, 2020 at 16:11 UTC

    Ah, very smooth. Thanks!

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2021-10-19 12:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (76 votes). Check out past polls.

    Notices?