develooper Front page | perl.perl6.language | Postings from August 2005

undef.chars?

Thread Next
From:
Ingo Blechschmidt
Date:
August 4, 2005 15:28
Subject:
undef.chars?
Message ID:
dcu4ko$has$1@sea.gmane.org
Hi,

(found in the Pugs testsuite.)

    my $undef = undef;
    say $undef.chars?   # 0? undef? die?
    say chars $undef;   # 0? undef? die?

I'd opt for "undef.chars" to be an error ("no such method") and "chars
undef" to return 0 (with a warning printed to STDERR^W$*ERR).

Opinions?


--Ingo

-- 
Linux, the choice of a GNU | When cryptography is outlawed, bayl bhgynjf
generation on a dual AMD   | jvyy unir cevinpl!  
Athlon!                    | 


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About