Skip Menu |

This queue is for tickets about the Apache-Session CPAN distribution.

Report information
The Basics
Id: 1251
Status: resolved
Priority: 0/
Queue: Apache-Session

People
Owner: Nobody in particular
Requestors: cbrooks [...] organiccodefarm.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 1.54
  • 1.82
Fixed in: (no value)



Subject: Bug in t/99moduniqgen
Distribution name and version: Apache-Session-1.54 Perl version: 5.005_03 OS: Linux montreal 2.2.14-5.0smp #1 SMP Tue Mar 7 21:01:40 EST 2000 i686 unknown Description: I was attempting to install Apache::Session using CPAN. I got the following results during make test: [root@montreal Apache-Session-1.54]# make test PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl5/5.00503/i686-linux -I/usr/lib/perl5/5.00503 -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t t/99base64.........ok t/99dbfile.........ok t/99dbfilestore....ok t/99file...........ok t/99filelock.......ok t/99filestore......ok t/99flex...........ok t/99md5gen.........ok t/99moduniqgen.....String found where operator expected at blib/lib/Apache/Session/Generate/ModUniqueId.pm line 11, near "&Carp::croak 'Can\'t get UNIQUE_ID env variable. Make sure mod_unique_id is enabled.'" (Missing operator before 'Can\'t get UNIQUE_ID env variable. Make sure mod_unique_id is enabled.'?) syntax error at blib/lib/Apache/Session/Generate/ModUniqueId.pm line 11, near "&Carp::croak 'Can\'t get UNIQUE_ID env variable. Make sure mod_unique_id is enabled.'" BEGIN failed--compilation aborted at t/99moduniqgen.t line 1. t/99moduniqgen.....dubious Test returned status 255 (wstat 65280, 0xff00) t/99nulllock.......ok t/99semaphore......ok t/99storable.......ok t/99uue............ok Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/99moduniqgen.t 255 65280 ?? ?? % ?? Failed 1/18 test scripts, 66.67% okay. 0/97 subtests failed, 100.00% okay. make: *** [test_dynamic] Error 11 This appears to be related to the require Carp statement in line 11: 1 package Apache::Session::Generate::ModUniqueId; 2 3 use strict; 4 use vars qw($VERSION); 5 $VERSION = '0.01'; 6 7 sub generate { 8 my $session = shift; 9 unless (exists $ENV{UNIQUE_ID}) { 10 require Carp; 11 Carp::croak 'Can\'t get UNIQUE_ID env variable. Make sure mod_unique_id is enabled.'; 12 } 13 $session->{data}->{_session_id} = $ENV{UNIQUE_ID}; 14 } Replacing require with use in line 11 eliminated the problem. [root@montreal Apache-Session-1.54]# make test PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib -I/usr/lib/perl5/5.00503/i686-linux -I/usr/lib/perl5/5.00503 -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t t/99base64.........ok t/99dbfile.........ok t/99dbfilestore....ok t/99file...........ok t/99filelock.......ok t/99filestore......ok t/99flex...........ok t/99md5gen.........ok t/99moduniqgen.....ok t/99nulllock.......ok t/99semaphore......ok t/99storable.......ok t/99uue............ok All tests successful. Files=18, Tests=100, 1 wallclock secs ( 1.20 cusr + 0.14 csys = 1.34 CPU) Thanks, Chris
From: johnc [...] no1.com.au
[guest - Mon Jul 8 14:15:01 2002]: I have exactly the same problem. Is there any news on this issue? Regards, John
From: slaven [...] rezic.de
[guest - Mon Jul 8 14:15:01 2002]: [...] Show quoted text
> > This appears to be related to the require Carp statement in line 11: > > 1 package Apache::Session::Generate::ModUniqueId; > 2 > 3 use strict; > 4 use vars qw($VERSION); > 5 $VERSION = '0.01'; > 6 > 7 sub generate { > 8 my $session = shift; > 9 unless (exists $ENV{UNIQUE_ID}) { > 10 require Carp; > 11 Carp::croak 'Can\'t get UNIQUE_ID env variable. Make > sure mod_unique_id is enabled.'; > 12 } > 13 $session->{data}->{_session_id} = $ENV{UNIQUE_ID}; > 14 } > > Replacing require with use in line 11 eliminated the problem. >
A better solution is to put the croak argument into (...). "use Carp" is not a good idea because this means that Carp gets always loaded, even if there's no error. Regards, Slaven
From: CHORNY [...] cpan.org
On Sep 09 09:57:12 2003, SREZIC wrote: Show quoted text
> A better solution is to put the croak argument into (...). "use Carp" > is not a good idea because this means that Carp gets always loaded, > even if there's no error.
Fixed in 1.82_01. ModUniqueId.pm, ModUsertrack.pm. -- Alexandr Ciornii, http://chorny.net