[Module-build-checkins] Module-Build/t xs.t,1.34,1.35
Status: Beta
Brought to you by:
kwilliams
From: Randy W. S. <si...@us...> - 2005-12-04 08:48:19
|
Update of /cvsroot/module-build/Module-Build/t In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4584/t Modified Files: xs.t 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: xs.t =================================================================== RCS file: /cvsroot/module-build/Module-Build/t/xs.t,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- xs.t 27 Nov 2005 09:32:50 -0000 1.34 +++ xs.t 4 Dec 2005 08:48:09 -0000 1.35 @@ -61,7 +61,7 @@ like stdout_of( sub {$mb->run_perl_command([ '-Mblib', '-M'.$dist->name, - '-we', "print @{[$dist->name]}::ok()"])}), qr/ok$/; + '-we', "print @{[$dist->name]}::okay()"])}), qr/ok$/; like stdout_of( sub {$mb->run_perl_command([ '-Mblib', '-M'.$dist->name, @@ -172,7 +172,7 @@ MODULE = Simple PACKAGE = Simple SV * -ok() +okay() CODE: RETVAL = newSVpv( "ok", 0 ); OUTPUT: @@ -182,11 +182,13 @@ $dist->add_file( 'Simple.pm', <<"---" ); package Simple; -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 Simple \$VERSION; @@ -215,7 +217,7 @@ use Simple; ok( 1 ); -ok( Simple::ok() eq 'ok' ); +ok( Simple::okay() eq 'ok' ); --- $dist->regen; |