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

Re: Roadmap/plan for Perl 5?

Thread Previous | Thread Next
From:
Paul "LeoNerd" Evans
Date:
September 8, 2014 14:00
Subject:
Re: Roadmap/plan for Perl 5?
Message ID:
20140908145955.76d53dd9@shy.leonerd.org.uk
On Mon, 8 Sep 2014 09:26:44 -0400
bulk88 <bulk88@hotmail.com> wrote:

> > 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.

I think you mean s/strict/warnings/.

Indeed; this kind of situation is one of the places where I find it
useful to turn off that pesky warning; another being e.g.

  if( do { no warnings 'uninitialized'; $foo eq "something" } ) ...

just to shut up the problem of undef.

-- 
Paul "LeoNerd" Evans

leonerd@leonerd.org.uk
http://www.leonerd.org.uk/  |  https://metacpan.org/author/PEVANS

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