Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
improved Mojo::Loader regex check a bit
  • Loading branch information
kraih committed Oct 9, 2011
1 parent 4279a92 commit 0886e76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Mojo/Loader.pm
Expand Up @@ -15,7 +15,7 @@ sub load {
my ($self, $module) = @_;

# Check module name
return 1 if !$module || $module !~ /^\w[\w\:\']+\w$/;
return 1 if !$module || $module !~ /^\w(?:[\w\:\']*\w)?$/;

# Already loaded
return if $module->can('new');
Expand Down

0 comments on commit 0886e76

Please sign in to comment.