Skip to content

anonymous /MyFailure1.pm secret
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Testcase showing redefinition warning not being caught
#!/usr/bin/perl -w
use File::Find;
use File::Spec;
use Test::More;
use Test::NoWarnings;
use warnings FATAL => qw(all);
my @files;
File::Find::find(
sub
{
if (/\.pm$/ && $File::Find::dir)
{
push(@files, $File::Find::name);
}
},
"."
);
done_testing(scalar(@files) + 1); # Test::NoWarnings adds an implicit test case
foreach my $file (@files)
{
my $path = File::Spec->canonpath($file);
my $includeString = "$file";
if ($path =~ /(.*)\.pm/)
{
my $relativePath = $1;
my @subPath = split /\\/, $relativePath;
$includeString = join '::', @subPath;
}
use_ok($includeString);
}
1;
package MyFailure1;
use strict;
use warnings;
use base 'Exporter';
our @EXPORT = qw(duplicateFunction);
sub duplicateFunction
{
return;
}
1;
__END__
package MyFailure2;
use strict;
use warnings;
use base 'Exporter';
our @EXPORT = qw(duplicateFunction);
sub duplicateFunction
{
return;
}
1;
__END__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.