Created
June 12, 2012 04:47
-
-
Save preaction/2915077 to your computer and use it in GitHub Desktop.
method_ref for Perl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sub method_ref { | |
| my ( $self, $method_name, @args ) = @_; | |
| return sub { $self->$method_name( @args, @_ ); } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment