[Mimedefang] When action_add_part() isn't enough...

Kees Theunissen C.J.Theunissen at differ.nl
Sun Sep 16 01:42:34 EDT 2012

On Sun, 16 Sep 2012, kd6lvw at yahoo.com wrote:

>--- On Sat, 9/15/12, Philip Prindeville <philipp_subx at redfish-solutions.com> wrote:
>> On 9/14/12 12:20 PM, kd6lvw at yahoo.com wrote:
>> > --- On Thu, 9/13/12, Philip Prindeville <philipp_subx at redfish-solutions.com>
>> wrote:
>> >> $offset = -1 unless defined($offset);
>> >> Seem reasonable?
>> >
>> > No: Possibly deprecated construct under perl 5.14.  [5.16 - sic]
>> So since this only affects arrays and hashes, then we're good?
>Perhaps, but I'm still not certain that such was actually confirmed.
>An actual citation from the perl site would be the best evidence.

Though I didn't cite the warning, I _did_ mention a perl site:
http://perldoc.perl.org/functions/defined.html. That site shows the
documentation of the defined function for version 5.16.0.

And even perldoc v5.12.3 --installed on my own workstation-- says:

~$ perldoc -f defined
   defined EXPR
   defined Returns a Boolean value telling whether EXPR has a value other
           than the undefined value "undef". If EXPR is not present, $_
           is checked.
           Use of "defined" on aggregates (hashes and arrays) is
           deprecated. It used to report whether memory for that
           aggregate has 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"   }


Kees Theunissen.

Kees Theunissen,  System and network manager,   Tel: +31 (0)30 6096724
Dutch Institute For Fundamental Energy Research (DIFFER)
e-mail address:   C.J.Theunissen at differ.nl
postal address:   PO Box 1207, 3430 BE Nieuwegein, NL
visitors address: Edisonbaan 14, 3439 MN Nieuwegein, NL

More information about the MIMEDefang mailing list