#!perl -wT
# NB. For PERL_CORE to be set, taint mode must not be enabled
eval "${callpack}::This()";
like( $@, "/^This is not a valid $testpack macro/", "trying a non-existing macro");
eval "${callpack}::NOSUCHNAME()";
like( $@, "/^NOSUCHNAME is not a valid $testpack macro/", "trying a non-existing macro");
# Testing all macros
my $v = eval "${callpack}::$name()";
is( $@, '', "calling the constant $name as a function" ); like( $v, '/^\d+$/', "checking that $name is a number ($v)" );
} else {
"calling the constant via its name" );
skip "irrelevant test in this case", 1 }
}
}
}