[Module-build-checkins] Module-Build/t/lib DistGen.pm,1.14,1.15
Status: Beta
Brought to you by:
kwilliams
From: Randy W. S. <si...@us...> - 2005-12-04 08:48:18
|
Update of /cvsroot/module-build/Module-Build/t/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4584/t/lib Modified Files: DistGen.pm Log Message: The "base" module in Perl 5.005 doesn't seem to work as expected, so we manually require the modules and stuff them in @INC. Also, rename the sample ok() method to okay() to get rid of a reserved word warning. Index: DistGen.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/lib/DistGen.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- DistGen.pm 29 Nov 2005 05:13:04 -0000 1.14 +++ DistGen.pm 4 Dec 2005 08:48:09 -0000 1.15 @@ -91,18 +91,20 @@ use strict; use $self->{name}; -ok( 1 ); +ok 1; --- } else { $self->add_file( $module_filename, <<"---" ) unless $self->{filedata}{$module_filename}; package $self->{name}; -use base qw( Exporter DynaLoader ); - -use vars qw( \$VERSION \@EXPORT_OK ); \$VERSION = '0.01'; -\@EXPORT_OK = qw( ok ); + +require Exporter; +require DynaLoader; + +\@ISA = qw(Exporter DynaLoader); +\@EXPORT_OK = qw( okay ); bootstrap $self->{name} \$VERSION; @@ -135,7 +137,7 @@ MODULE = $self->{name} PACKAGE = $self->{name} SV * -ok() +okay() CODE: RETVAL = newSVpv( "ok", 0 ); OUTPUT: @@ -161,9 +163,9 @@ use strict; use $self->{name}; -ok( 1 ); +ok 1; -ok( $self->{name}::ok() eq 'ok' ); +ok( $self->{name}::okay() eq 'ok' ); --- } } |