We're getting
an error in Fraction.pm, which we've used for years without a problem.
It's in line 123. I noticed that he put 1 line of code over 2 lines.
He also did not put parentheses around the if clause. I'm not sure if
these are allowed in Perl or allowed in the more recent releases of Active State
perl & perlEx? I've included the errors we're getting below his code
and my interpretation of what I think the precedence should be below that.
Does this seem like a reasonable fix? Is anybody familiar with this
module?
Thanks,
Ember
118: if ( &_tag($REDUCE,
[EMAIL PROTECTED]) ne 'NO_REDUCE'
119: and &_tag($RED_STATE, [EMAIL PROTECTED]) ne 'IS_REDUCED' )
120: {
121: my $not_reduced;
122: ($not_reduced, @frac) = &_reduce(@frac);
123: @frac = &_fix_auto('DOWN',[EMAIL PROTECTED], @frac) if $not_reduced
124: and &_tag($AUTO, [EMAIL PROTECTED]) eq 'AUTO';
125: }
119: and &_tag($RED_STATE, [EMAIL PROTECTED]) ne 'IS_REDUCED' )
120: {
121: my $not_reduced;
122: ($not_reduced, @frac) = &_reduce(@frac);
123: @frac = &_fix_auto('DOWN',[EMAIL PROTECTED], @frac) if $not_reduced
124: and &_tag($AUTO, [EMAIL PROTECTED]) eq 'AUTO';
125: }
----------------------------------------------------------------------------------------------------------
*** 'C:\Inetpub\cgi\my.cgi' [27] error message at: 2003/03/27
13:33:18
Precompiler: Execute called with [C:\Inetpub\cgi\my.cgi]
Precompiler: Checking for existence of C:\Inetpub\cgi\my.cgi in Cache
Precompiler: Script C:\Inetpub\cgi\my.cgi is compiled and 1722 minutes old.
Precompiler: Eval Error:
Package:[PerlEx::Precompiler::c_::inetpub::cgi::my_cgi]
File:[C:\Inetpub\cgi\my.cgi]
Error:[syntax error at C:/Perl/lib/Math/Fraction.pm line 123, at EOF
Missing right curly or square bracket at F:/Perl/lib/Math/Fraction.pm line 123, at end of line
Compilation failed in require at (eval 1) line 125.
BEGIN failed--compilation aborted at lib/Test.pm line 74.
Compilation failed in require at (eval 1) line 125.
BEGIN failed--compilation aborted at (eval 2) line 176.
]
Precompiler: Returning -1 at
514
Precompiler: Execute called with [C:\Inetpub\cgi\my.cgi]
Precompiler: Checking for existence of C:\Inetpub\cgi\my.cgi in Cache
Precompiler: Script C:\Inetpub\cgi\my.cgi is compiled and 1722 minutes old.
Precompiler: Eval Error:
Package:[PerlEx::Precompiler::c_::inetpub::cgi::my_cgi]
File:[C:\Inetpub\cgi\my.cgi]
Error:[syntax error at C:/Perl/lib/Math/Fraction.pm line 123, at EOF
Missing right curly or square bracket at F:/Perl/lib/Math/Fraction.pm line 123, at end of line
Compilation failed in require at (eval 1) line 125.
BEGIN failed--compilation aborted at lib/Test.pm line 74.
Compilation failed in require at (eval 1) line 125.
BEGIN failed--compilation aborted at (eval 2) line 176.
]
Precompiler: Returning -1 at
514
-----------------------------------------------------------------------------------------------------------
if ( (&_tag($REDUCE,
[EMAIL PROTECTED]) ne 'NO_REDUCE') and (&_tag($RED_STATE, [EMAIL PROTECTED]) ne 'IS_REDUCED'
))
{
my $not_reduced;
($not_reduced, @frac) = &_reduce(@frac);
@frac = &_fix_auto('DOWN',[EMAIL PROTECTED], @frac) if ($not_reduced and (&_tag($AUTO, [EMAIL PROTECTED]) eq 'AUTO'));
}
{
my $not_reduced;
($not_reduced, @frac) = &_reduce(@frac);
@frac = &_fix_auto('DOWN',[EMAIL PROTECTED], @frac) if ($not_reduced and (&_tag($AUTO, [EMAIL PROTECTED]) eq 'AUTO'));
}