develooper Front page | perl.perl5.porters | Postings from September 2014

Re: Roadmap/plan for Perl 5?

Thread Previous | Thread Next
From:
bulk88
Date:
September 8, 2014 13:26
Subject:
Re: Roadmap/plan for Perl 5?
Message ID:
BLU436-SMTP190B98B57CDD9D08141C730DFC10@phx.gbl
demerphq wrote:
> 
> I think there is a reason to move the to a different namespace: we could 
> then fix the interface issues with some of them.
> 
> For instance reftype() returns PL_sv_undef() when the item is not a ref. 
> This means you have to guard usage of it somehow.
> 
> If it returned PL_sv_no() instead, then we could safely write:
> 
> if (reftype($foo) eq "HASH") {
> }
> 
> instead of
> 
> my $reftype= ref($foo);
> if (defined $reftype and $reftype eq "HASH") {
> }


Use no strict uninit to turn off the warning, that skips the extra 
defined op.

Thread Previous | 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