Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^3: Disabling runtime warnings in dynamic scope? (Scope::Context)

by beech (Parson)
on Apr 25, 2018 at 23:16 UTC ( #1213562=note: print w/replies, xml ) Need Help??


in reply to Re^2: Disabling runtime warnings in dynamic scope? (no warnings 'exiting'; use warnings 'exiting';
in thread Disabling runtime warnings in dynamic scope?

PadWalker?

update: PadWalker is a bust, peek_sub and peek_our didn't return WARNING_BITS.

But Scope::Context looks like a candidate

update: another candidate Devel::Declare

  • Comment on Re^3: Disabling runtime warnings in dynamic scope? (Scope::Context)

Replies are listed 'Best First'.
Re^4: Disabling runtime warnings in dynamic scope? (Devel::Declare)
by LanX (Cardinal) on Apr 26, 2018 at 00:06 UTC
Re^4: Disabling runtime warnings in dynamic scope? (Scope::Context)
by LanX (Cardinal) on Apr 25, 2018 at 23:37 UTC
    > Scope::Context

    Thanks, interesting! :)

    Seems to be based on Scope::Upper and does loads of black magic. (And might be useful to implement lisp style macros)

    But only on upper contexts. The subs in questions are "lower" contexts

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Wikisyntax for the Monastery

      Magicky indeed, another one

      Code::Splice - Injects the contents of one subroutine at a specified point elsewhere.

      based on B::Generate - Create your own op trees.

        Dark than dark magic, and P5P will abandon any hope of progress.

        This is really interesting though.

        But I think you missed the part where I asked for a "cleaner solution" ;)

        Cheers Rolf
        (addicted to the Perl Programming Language and ☆☆☆☆ :)
        Wikisyntax for the Monastery

Re^4: Disabling runtime warnings in dynamic scope? (PadWalker)
by LanX (Cardinal) on Apr 25, 2018 at 23:25 UTC
    I'm pretty sure PadWalker can't access global special vars inside a foreign sub.

    And manipulating the warn handler looks cleaner now (though I have to check caller(2) too)

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2021-04-23 07:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?