Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^4: Bug in eval in pre-5.14

by choroba (Cardinal)
on Aug 13, 2016 at 23:11 UTC ( [id://1169727]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Bug in eval in pre-5.14
in thread Bug in eval in pre-5.14

OK, and now change {1} in the object's destructor to { die 'inside' } - all other cases still catch the Exception #, but Splacker catches the inner one.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^5: Bug in eval in pre-5.14
by $h4X4_|=73}{ (Monk) on Aug 14, 2016 at 10:16 UTC

    The output for me made it look like they all bugged out. Notice they all have the same message and line number.eval is hiding a warning from us now with die replacing the number one and this is "just another bug".

    Caught with Splacker: inside at C:\xampp\cgi-bin\Test\index.cgi line 2 +3. Caught with $@: inside at C:\xampp\cgi-bin\Test\index.cgi line 23. Caught with or: inside at C:\xampp\cgi-bin\Test\index.cgi line 23. Caught with Try::Tiny: inside at C:\xampp\cgi-bin\Test\index.cgi line +23. 5.008008
    To catch the hidden error by using the code below, it will work with AND WITHOUT! warnings on...
    "in cleanup" warnings generated from destructor errors are no longer enabled by "use warnings"
    $SIG{ __WARN__} = sub { exit 1 if $_[0] =~ /in cleanup/ };

      Time to upgrade, it seems.
      5.020001 Caught with Splacker: inside at ./1.pl line 23. Caught with $@: Exception 1! at ./1.pl line 45. Caught with or: Exception 2! at ./1.pl line 54. Caught with Try::Tiny: Exception 3! at ./1.pl line 65.

      ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-19 19:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found