Devel-Trepan
view release on metacpan or search on metacpan
lib/Devel/Trepan/Util.pm view on Meta::CPAN
# Note: This has to appear before the below assignment
$text =~ s/^\s*(?:my|our|local)\s*(\((?:.+)\)\s*=.*)[^;]*;.*$/$1/;
} elsif ($text =~ /^\s*(?:my|our|local)\s+(?:.+)\s*=\s*(.+);.*$/) {
# my ... = ...;
$text = $1;
# } elsif ($text =~ /^\s*case\s+/) {
# # EXPRESSION in: case EXPESSION
# $text =~ s/^\s*case\s*//;
# } elsif ($text =~ /^\s*sub\s*.*\(.+\)/) {
# $text =~ s/^\s*sub\s*.*\((.*)\)/\(\1\)/;
} elsif ($text =~ /^\s*\$[A-Za-z_][A-Za-z0-9_\[\]]*\s*=[^=>]/) {
# RHS of an assignment statement.
$text =~ s/^\s*[A-Za-z_][A-Za-z0-9_\[\]]*\s*=//;
}
return $text;
}
sub invalid_filename($)
{
my $filename = shift;
return "Command file '$filename' doesn't exist" unless -f $filename;
( run in 0.304 second using v1.01-cache-2.11-cpan-b61123c0432 )