Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: This is not a pipe

by hardburn (Abbot)
on Mar 11, 2005 at 19:26 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://438766]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2024-04-24 11:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found