Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: Any way to access the contents of a block eval?

by ikegami (Pope)
on Oct 12, 2007 at 17:00 UTC ( #644512=note: print w/replies, xml ) Need Help??


in reply to Re^2: Any way to access the contents of a block eval?
in thread Any way to access the contents of a block eval?

In that case, chromatic's code simplifies to

use B::Deparse qw( ); my $deparse = B::Deparse->new(); sub lives_ok(&;$) { my ($code, $desc) = @_; $desc = $deparse->coderef2text($code) if !defined($desc); return Text::Exception::lives_ok($code, $desc); }

Be careful to avoid accidently overriding your own functions with those from the module you are extending.

Replies are listed 'Best First'.
Re^4: Any way to access the contents of a block eval?
by adrianh (Chancellor) on Oct 16, 2007 at 13:16 UTC
    D'oh! I knew about that.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://644512]
help
Chatterbox?
[Eily]: that's not what I'd call a silent h :)
[LanX]: see soundfile https://en. wiktionary.org/ wiki/human# Pronunciation
[Your Mother]: Just Another Perl 'Acker.
[LanX]: I pronounce it 'juːmən'
[Your Mother]: Hey, let's not bring antisemitism into the conversation.
[LanX]: for centuries posh English speakers tried to approach French, that's where all the trouble starts
[Eily]: Just another Perl coeurs
[Eily]: (perl with hearts, 'Acker with a French accent is pronunced like coeurs)
[LanX]: IMHO 'ju' for 'u' happens in English where they can't pronounce the French u (or German )
[LanX]: and I'm sure I read that *hotel* used to be pronounced 'otel by the English upperclass

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2017-03-27 17:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.