If the author used exists this would stop autovivification, and allow you to check for a sequence twice!

Just a side note...

In a boolean context such as that of the OPed code fragment, hash keys are not autovivified at their lowest level, but any 'intervening' keys are. This is also true when exists is used. So with or without  exists, as long as autovivification of the  '_seq' key does not cause any side effects, the code can check for the pre-existence of  $name as often as desired!
Update: However, there is a (possibly very important) difference between the two tests: A key that really and truly does exist in a hash may yet have a value like undef, the empty string, the string  '0' or numeric 0 that will evaluate as boolean false.

>perl -wMstrict -MData::Dumper -le "my $hr; die 'huh?' if $hr->{foo}{bar}; print Dumper $hr; undef $hr; print 'hash ref de-init'; die 'huh?' if exists $hr->{foo}{bar}; print Dumper $hr; " $VAR1 = { 'foo' => {} }; hash ref de-init $VAR1 = { 'foo' => {} };

In reply to Re^2: [BioPerl] a warning I do not understand omits a sequence by AnomalousMonk
in thread [BioPerl] a warning I do not understand omits a sequence by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.