Skip to content

Commit

Permalink
small optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jul 8, 2013
1 parent e852bb0 commit c3e0ee2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

4.18 2013-07-07
4.18 2013-07-08
- Added --mode option to Morbo.
- Fixed bug in Mojo::UserAgent where not all 2xx responses would be accepted
for CONNECT requests.
Expand Down
4 changes: 2 additions & 2 deletions lib/Mojo/Base.pm
Expand Up @@ -23,9 +23,9 @@ sub import {
elsif ($flag eq '-strict') { $flag = undef }

# Module
elsif (my $file = $flag) {
elsif ((my $file = $flag) && !$flag->can('new')) {
$file =~ s!::|'!/!g;
require "$file.pm" unless $flag->can('new');
require "$file.pm";
}

# ISA
Expand Down

2 comments on commit c3e0ee2

@marcusramberg
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\o/

@ChinaXing
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bu cuo

Please sign in to comment.