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

Re: This is not a pipe

by hardburn (Abbot)
on Mar 11, 2005 at 19:26 UTC ( #438766=note: print w/replies, xml ) Need Help??


in reply to This is not a pipe

! $this->isa("pipe")

Syntax is correct, though it will die in runtime because $this is not declared.

"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Replies are listed 'Best First'.
Re^2: This is not a pipe
by jhourcle (Prior) on Mar 13, 2005 at 23:59 UTC

    If you're worried about errors, I recommend instead:

    ! UNIVERSAL::isa($this, 'pipe')

    Just in case there's a possibility that $this might be undef, or an unblessed scalar.

      For poetry, I'm not worried about it. Syntax correctness is all that matters, and putting UNIVERSAL in there just adds clutter.

      "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

Re^2: This is not a pipe
by Revelation (Deacon) on Mar 16, 2005 at 22:49 UTC
    I think an easier way to prevent it from die-ing, would be to change that to:  !this->isa('pipe'); or  this->isa(!'pipe'); is another possibility. I agree the  Universal:: just add clutter.

    Gyan Kapur

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2019-04-23 05:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I am most likely to install a new module from CPAN if:
















    Results (114 votes). Check out past polls.

    Notices?