in reply to Concatenate strings before Test::More::ok
You're checking if string value defined. And it's certainly defined. Try the following:
use strict; use warnings; use Test::More tests => 7; my $val = 'Mysimple_mod'; BEGIN { use_ok('Mysimple_mod', qw (external) ) }; ok ( defined( &external ) , "#2 external is defined"); ok ( defined( &Mysimple_mod::internal ) , "#3 internal is defined"); ok ( defined( &Mysimple_mod::bogus ) , "#4 bogus subroutine"); ok ( defined( &{$val.'::bogus'} ) , "#5 bogus subroutine"); ok ( defined( &{$val.'::internal'} ) , "#6 internal subroutine" +); my $catval = "${val}" .'::bogus'; print "\n$catval\n"; ok ( defined( &$catval ) , "#7 bogus subroutine");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Concatenate strings before Test::More::ok
by gctaylor1 (Hermit) on Apr 20, 2009 at 00:21 UTC |