[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: [patch 5.005_63] typo in h2xs



On Fri, 07 Jan 2000 14:40:51 EST, Ilya Zakharevich wrote:
>Helmut Jarausch writes:
>> 
>> This patch adds a missing '\' to escape a $ in a HERE document in
>> h2xs.PL (and therefore in h2xs)
>> 
>>       my \$constname;
>> -     our $AUTOLOAD;
>> +     our \$AUTOLOAD;
>>       (\$constname = \$AUTOLOAD) =~ s/.*:://;
>>       croak "&$module::constant not defined" if \$constname eq
>> 'constant';
>
>[removed the excessive context and converted to -u]
>
>On the second thought, this is a wrong approach.  'our' should be
>removed altogether, and the older code [I put there ;-] should be
>restored.  h2xs is used to generate modules, and nobody said that
>these modules are going to be used with the latest and greatest perls
>only.

Note that h2xs puts a 'require 5.005_62;' in the generated code.

>I would think that "two major backlevels" rule is what should be
>applied: h2xs of 5.6 should generate scripts compatible with 5.004
>(possibly 5.004_05?).

We should certainly add an option to h2xs to generate code compatible
with older versions, but the default should be the progressive one,
IMHO.  It would seem Larry agrees, given that he added the 'our'
stuff to h2xs.

(BTW, these messages are not showing up with perl5-porters@perl.org
on the Cc list.  I had to add it in by hand.  Did this thread originate
in a list-to-newsgroup gateway that doesn't feed postings back to
the list?)


Sarathy
gsar@ActiveState.com


Follow-Ups from:
Ilya Zakharevich <ilya@math.ohio-state.edu>
Ilya Zakharevich <ilya@math.ohio-state.edu>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]