return 1;
}
+sub sanitize_prefix {
+ my $prefix = shift;
+
+ if (defined $prefix) {
+ if (length $prefix and $prefix !~ /_$/) {
+ $prefix .= '_';
+ }
+ } else {
+ $prefix = '';
+ }
+
+ return $prefix;
+}
+
my %default_exports = (
load_or_skip => \&load_or_skip,
load_or_skip_all => \&load_or_skip_all,
}
sub init_run_perl {
- my $prefix = shift;
-
- if (defined $prefix) {
- if (length $prefix and $prefix !~ /_$/) {
- $prefix .= '_';
- }
- } else {
- $prefix = '';
- }
-
- my $p = $prefix;
+ my $p = sanitize_prefix(shift);
return (
run_perl => \&run_perl,