Skip to content

Commit

Permalink
removed { from regex in sub name check
Browse files Browse the repository at this point in the history
  • Loading branch information
stevieb9 committed Jan 12, 2016
1 parent c6f86a8 commit f4ba01d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/Devel/Examine/Subs.pm
Expand Up @@ -328,16 +328,14 @@ sub add_functionality {

my $sub_name;

print "***$code[0]***\n";
if ($code[0] =~ /sub\s+(\w+)/){
print "IN HERE!\n";
$sub_name = $1;
}
else {
print "IN ELSE\n";
croak "add_functionality() couldn't extract the sub name.";
}

print "*** $sub_name\n";
my $rw = File::Edit::Portable->new;

$rw->splice(file => $file, insert => \@code, line => $start_writing);
Expand Down

0 comments on commit f4ba01d

Please sign in to comment.