#pm file package BPTest; use strict; use warnings; sub do_stuff { $DB::single = 1; my $x = 10; return $x; } 1; #test file use Test::More tests => 2; BEGIN { use_ok( 'BPTest' ); } is( BPTest->do_stuff, 10, 'do_stuff returns 10' ) #### plxc16479> perl -d -Mblib t/001_load.t Loading DB routines from perl5db.pl version 1.33 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. 1..2 ok 1 - use BPTest; main::(t/001_load.t:9): is( main::(t/001_load.t:10): BPTest->do_stuff, main::(t/001_load.t:11): 10, main::(t/001_load.t:12): 'do_stuff returns 10' main::(t/001_load.t:13): ) DB<1> c BPTest::do_stuff(/nfs/pdx/disks/nehalem.pde.077/tmp/BPTest/blib/lib/BPTest.pm:7): 7: my $x = 10; DB<1> #### plxc16479> perl -d Build test Loading DB routines from perl5db.pl version 1.33 Editor support available. Enter h or `h h' for help, or `man perldebug' for more help. main::(Build:17): my $progname; DB<1> c t/001_load.t .. ok All tests successful. Files=1, Tests=2, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.02 cusr 0.00 csys = 0.05 CPU) Result: PASS Debugged program terminated. Use q to quit or R to restart, use o inhibit_exit to avoid stopping after program termination, h q, h R or h o to get additional info. DB<1>