Skip to content

Commit

Permalink
mention why monkey_patch is split between Mojo::Base and Mojo::Util
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 24, 2015
1 parent 5adf558 commit 175b3c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/Mojo/Base.pm
Expand Up @@ -18,6 +18,7 @@ my $NAME
# Protect subclasses using AUTOLOAD
sub DESTROY { }

# Declared here to avoid circular require problems in Mojo::Util
sub _monkey_patch {
my ($class, %patch) = @_;
no strict 'refs';
Expand Down
1 change: 1 addition & 0 deletions lib/Mojo/Util.pm
Expand Up @@ -121,6 +121,7 @@ sub html_unescape {
sub md5_bytes { md5 @_ }
sub md5_sum { md5_hex @_ }

# Declared in Mojo::Base to avoid circular require problems
sub monkey_patch { Mojo::Base::_monkey_patch(@_) }

# Direct translation of RFC 3492
Expand Down

0 comments on commit 175b3c7

Please sign in to comment.