#!/usr/bin/perl -T # v5.8.8 (debian etch / ubuntu hardy) use Test::More tests=>2; # $VERSION .082 (ubuntu hardy) # $VERSION eq .084 (cpan) use Test::NoWarnings; use warnings; use strict; use lib qw| . |; use foo; # defined in foo.pm identical to get_match2 # does # is(get_match(undef),undef,'undef gives undef'); # defined below, test 'no warnings' fails as I expect is(get_match2(undef),undef,' match 2 undef gives undef'); sub get_match2 { my $match_me=shift; if ($match_me=~/(\d.+)/){ return $1; } else{ return undef; } }