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

Re^3: What magic is this?

by shmem (Chancellor)
on Oct 26, 2006 at 12:46 UTC ( #580748=note: print w/replies, xml ) Need Help??

in reply to Re^2: What magic is this?
in thread What magic is this?

That code block in my (version 2.34) looks like
if (defined $arg) { if (ref($arg) and UNIVERSAL::isa($arg, 'IO::Handle')) { $ioref = $arg; } elsif (tied($arg)) { my $class = ref($arg); no strict 'refs'; $ioref = $arg if defined &{"${class}::TIEHANDLE"}; } else { require IO::Handle; eval { no strict 'refs'; $ioref = *{$arg}{IO} if defined *{$arg}; }; undef $@; } }

but to me it looks equally scary. undef $@ after eval? wtf?

At least, there's no strict 'refs'; inside the eval (but isn't it another wtf?)


_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://580748]
[marto]: you mean Jebus?
[LanX]: you mean JSuse?
[marto]: wouldn't it be jSuse
[marto]: like jQuery

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (6)
As of 2017-12-14 20:07 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (408 votes). Check out past polls.