Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Do you know where your variables are?
 
PerlMonks  

Re: This is not a pipe

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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 18: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 17: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
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.