On Mon Oct 31 15:57:09 2011, njh@bandsman.co.uk wrote:
Show quoted text> It only works if the called subroutine does Carp::carp('foo');
>
> If it does carp('foo'), that is ignored.
Hmm, can you send the shortest case code to reproduce or otherwise describe how it is manifesting for you?
I ask because the tests test for Carp::carp() and carp() (
http://cpansearch.perl.org/src/DMUEY/Test-Carp-0.2/t/02.functions.t) and those
test pass just fine AFAICT:
Running Build test
t/00.load.t ....... 1/1 # Testing Test::Carp 0.2
t/00.load.t ....... ok
t/01.import.t ..... # Testing Test::Carp 0.2
t/01.import.t ..... ok
t/02.functions.t .. 1/34 # Testing Test::Carp 0.2
t/02.functions.t .. ok
t/perlcritic.t .... skipped: Test::Perl::Critic required for testing PBP compliance
t/pod-coverage.t .. ok
t/pod.t ........... ok
All tests successful.
Files=6, Tests=73, 0 wallclock secs ( 0.03 usr 0.03 sys + 0.18 cusr 0.04 csys = 0.28 CPU)
Result: PASS
DMUEY/Test-Carp-0.2.tar.gz
./Build test -- OK
multivac:Test-Carp-0.2-sjNaXX root# prove t/02.functions.t
Name "main::running_under_some_shell" used only once: possible typo at /usr/bin/prove5.10.0 line 3.
t/02.functions.t .. 1/34 # Testing Test::Carp 0.2
t/02.functions.t .. ok
All tests successful.
Files=1, Tests=34, 0 wallclock secs ( 0.02 usr 0.00 sys + 0.02 cusr 0.00 csys = 0.04 CPU)
Result: PASS
multivac:Test-Carp-0.2-sjNaXX root# perl t/02.functions.t
1..34
ok 1 - use Test::Carp;
# Testing Test::Carp 0.2
ok 2 - carp() was called (I am /usr/bin/girl here me carp: args are )
ok 3 - carp() was called (I am /usr/bin/girl here me carp: args are 1 2 3)
ok 4 - carp() was called (w/ 'I am /usr/bin/girl here me carp: args are ') and matches '(?-xism:args are )'
ok 5 - carp() was called (w/ 'I am /usr/bin/girl here me carp: args are 1 2 3') and matches '(?-xism:args are 1 2 3)'
ok 6 - carp() was called (w/ 'I am /usr/bin/girl here me carp: args are ') and matches '(?-xism:args are\s+)'
ok 7 - carp() was called (w/ 'I am /usr/bin/girl here me carp: args are 1 2 3') and matches '(?-xism:args are(?:\s\d){3})'
ok 8 - carp() was called w/ empty string argument
ok 9 - carp() was called w/ empty string argument
ok 10 - carp() was called w/ undefined argument
ok 11 - carp() was called w/ undefined argument
ok 12 - carp() was called w/ undefined argument
ok 13 - carp() was called
ok 14 - carp() was called
ok 15 - carp() was called and matches '(?-xism:args are )'
ok 16 - carp() was called and matches '(?-xism:args are 1 2 3)'
ok 17 - carp() was called and matches '(?-xism:args are\s+)'
ok 18 - carp() was called and matches '(?-xism:args are(?:\s\d){3})'
ok 19 - carp() was called and matches ''
ok 20 - carp() was called and matches ''
ok 21 - carp() was called and matches 'undef()'
ok 22 - carp() was called and matches 'undef()'
ok 23 - carp() was called and matches 'undef()'
ok 24 - croak() was called (goodbye cruel cruel world: args are )
ok 25 - croak() was called (goodbye cruel cruel world: args are 1 2 3)
ok 26 - croak() was called (w/ 'goodbye cruel cruel world: args are ') and matches '(?-xism:args are )'
ok 27 - croak() was called (w/ 'goodbye cruel cruel world: args are 1 2 3') and matches '(?-xism:args are 1 2 3)'
ok 28 - croak() was called (w/ 'goodbye cruel cruel world: args are ') and matches '(?-xism:args are\s+)'
ok 29 - croak() was called (w/ 'goodbye cruel cruel world: args are 1 2 3') and matches '(?-xism:args are(?:\s\d){3})'
ok 30 - croak() was called w/ empty string argument
ok 31 - croak() was called w/ empty string argument
ok 32 - croak() was called w/ undefined argument
ok 33 - croak() was called w/ undefined argument
ok 34 - croak() was called w/ undefined argument
multivac:Test-Carp-0.2-sjNaXX root#
let me know, thanks!