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

Re^2: defined defined -- Bug or "Feature"?

by Anonymous Monk
on Dec 24, 2015 at 08:33 UTC ( [id://1151103]=note: print w/replies, xml ) Need Help??


in reply to Re: defined defined -- Bug or "Feature"?
in thread defined defined -- Bug or "Feature"?

Probably not, Pl_sv_false ought to be same as undef, there were some bugs regarding this, but i'm afk & my mem is fuzzy. Devel::Peek...:)

Replies are listed 'Best First'.
Re^3: defined defined -- Bug or "Feature"?
by dave_the_m (Monsignor) on Dec 24, 2015 at 09:36 UTC
    PL_sv_undef, PL_sv_no and PL_sv_yes are three distinct values with distinct properties. Only PL_sv_undef is undef.

    Dave.

      indeed :)
      #!/usr/bin/perl -- use Devel::Peek qw/ Dump /; select STDERR; print "\n\$ARGV\n"; Dump( $ARGV ); print "\nundef\n"; Dump( undef ); print "\n!!0 PL_sv_no\n"; Dump( !!0 ); print "\ndefined undef\n"; Dump( defined undef ); print "\n!!1 PL_sv_yes\n"; Dump( !!1 ); print "\ndefined defined undef\n"; Dump( defined defined undef ); __END__
      
      $ARGV
      SV = NULL(0x0) at 0x99b90c
        REFCNT = 1
        FLAGS = ()
      
      undef
      SV = NULL(0x0) at 0x3f4cc0
        REFCNT = 2147482895
        FLAGS = (READONLY)
      
      !!0 PL_sv_no
      SV = PVNV(0x3f7f84) at 0x3f4968
        REFCNT = 2147483646
        FLAGS = (PADTMP,IOK,NOK,POK,READONLY,pIOK,pNOK,pPOK)
        IV = 0
        NV = 0
        PV = 0x3f405c ""\0
        CUR = 0
        LEN = 12
      
      defined undef
      SV = PVNV(0x3f7f84) at 0x3f4968
        REFCNT = 2147483646
        FLAGS = (PADTMP,IOK,NOK,POK,READONLY,pIOK,pNOK,pPOK)
        IV = 0
        NV = 0
        PV = 0x3f405c ""\0
        CUR = 0
        LEN = 12
      
      !!1 PL_sv_yes
      SV = PVNV(0x3f7f9c) at 0x3f4978
        REFCNT = 2147483643
        FLAGS = (PADTMP,IOK,NOK,POK,READONLY,pIOK,pNOK,pPOK)
        IV = 1
        NV = 1
        PV = 0x3f8e7c "1"\0
        CUR = 1
        LEN = 12
      
      defined defined undef
      SV = PVNV(0x3f7f9c) at 0x3f4978
        REFCNT = 2147483643
        FLAGS = (PADTMP,IOK,NOK,POK,READONLY,pIOK,pNOK,pPOK)
        IV = 1
        NV = 1
        PV = 0x3f8e7c "1"\0
        CUR = 1
        LEN = 12
      

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-03-29 01:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found