#15 mummerplot deprecated perl warnings

v3.xx
open
nobody
None
5
2014-11-10
2013-10-24
Nathan Weeks
No

With mummer 3.23, I get the following error when I invoke mummerplot with perl 5.14.4:

$ perl -v

This is perl 5, version 14, subversion 4 (v5.14.4) built for amd64-freebsd
...
$ perl mummerplot
defined(%hash) is deprecated at mummerplot line 884.
        (Maybe you should just omit the defined()?)
defined(%hash) is deprecated at mummerplot line 894.
        (Maybe you should just omit the defined()?)
defined(%hash) is deprecated at mummerplot line 981.
        (Maybe you should just omit the defined()?)
defined(%hash) is deprecated at mummerplot line 991.
        (Maybe you should just omit the defined()?)
defined(%hash) is deprecated at mummerplot line 1034.
        (Maybe you should just omit the defined()?)
defined(%hash) is deprecated at mummerplot line 1044.
        (Maybe you should just omit the defined()?)

  USAGE: mummerplot  [options]  <match file>

Try 'mummerplot -h' for more information.

The warnings go away when mummerplot is modified to omit defined() at those lined numbers.

The documentation for defined() contains additional info:

$ perldoc -f defined
...
               Use of "defined" on aggregates (hashes and arrays) is
               deprecated.  It used to report whether memory for that
               aggregate had ever been allocated.  This behavior may disappear
               in future versions of Perl.  You should instead use a simple
               test for size:

                   if (@an_array) { print "has array elements\n" }
                   if (%a_hash)   { print "has hash members\n"   }

Discussion