# $subroutine_definition_diag_code = "\n" . q{RPerl::diag("IN POST-INIT, method direct call MODE } . $package_name . '::' . $subroutine_name . q{\n"); } . "\n"; # RPerl::diag("in Class::activate_subroutine_args_checking(), $subroutine_name is a method\n"); # NEED UPGRADE: is it possible to activate non-type-checked RPerl subroutines & methods w/out creating new subroutines? $subroutine_definition_code = '*{' . $package_name . '::' . $subroutine_name . '} = sub { ' . $subroutine_definition_diag_code . $subroutine_arguments_check_code . 'return &${' . $package_name . '::' . $subroutine_name . '}(@ARG); };';
# if ($subroutine_arguments_check_code ne q{}) { RPerl::diag('in Class::activate_subroutine_args_checking(), have method $subroutine_definition_code =' . "\n" . $subroutine_definition_code . "\n"); } eval($subroutine_definition_code) or croak($EVAL_ERROR); if ($EVAL_ERROR) { croak($EVAL_ERROR); } } else { # RPerl::diag( "in Class::activate_subroutine_args_checking(), $subroutine_name is a non-method subroutine\n" ); if ( eval( 'defined(&main::' . $subroutine_name . ')' ) ) { croak "ERROR ECOPR00, PRE-PROCESSOR: Attempt by package '$package_name' to re-define shared global subroutine '$subroutine_name', please re-name your subroutine or make it a method, croaking"; }
# DEV NOTE: must load into both main:: and $package_name:: namespaces,
# in order to call subroutines w/out class prefix from within class file (package) itself, and not to use AUTOLOAD
if ( $package_name eq '' ) { $package_name_tmp = 'main'; }
else { $package_name_tmp = $package_name; }
# $subroutine_definition_diag_code = "\n" . q{RPerl::diag("IN POST-INIT, subroutine direct call MODE main::} . $subroutine_name . q{\n"; } . "\n");
$subroutine_definition_code
= '*{main::'
. $subroutine_name
. '} = sub { '
. $subroutine_definition_diag_code
. $subroutine_arguments_check_code
. 'return &${'
. $package_name_tmp . '::'
. $subroutine_name
. '}(@ARG); };';
# if ($subroutine_arguments_check_code ne q{}) { RPerl::diag('in Class::activate_subroutine_args_checking(), have subroutine main:: $subroutine_definition_code =' . "\n" . $subroutine_definition_code . "\n"); } eval($subroutine_definition_code) or croak($EVAL_ERROR); if ($EVAL_ERROR) { croak($EVAL_ERROR); }
# no package name means 'main', handled above
if ( $package_name ne '' ) {
# $subroutine_definition_diag_code = "\n" . {RPerl::diag("IN POST-INIT, subroutine direct call MODE } . $package_name . '::' . $subroutine_name . q{\n"; } . "\n"); $subroutine_definition_code = '*{' . $package_name . '::' . $subroutine_name . '} = sub {' . $subroutine_definition_diag_code . $subroutine_arguments_check_code . 'return &${' . $package_name . '::' . $subroutine_name . '}(@ARG); };';
# if ($subroutine_arguments_check_code ne q{}) { # RPerl::diag('in Class::activate_subroutine_args_checking(), have subroutine package:: $subroutine_definition_code =' . "\n" . $subroutine_definition_code . "\n"); # } eval($subroutine_definition_code) or croak($EVAL_ERROR); if ($EVAL_ERROR) { croak($EVAL_ERROR); } } }
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 1045:
Unknown directive: =DEPRECATED
- Around line 1103:
Unknown directive: =DEPRECATED