Skip to content

Instantly share code, notes, and snippets.

@rkitover
Created January 17, 2013 21:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rkitover/4560212 to your computer and use it in GitHub Desktop.
Save rkitover/4560212 to your computer and use it in GitHub Desktop.
package EMS::GetPost;
use strict;
use warnings;
use Sub::Install;
sub import {
my $pkg = caller;
my $any = $pkg->can('any');
Sub::Install::install_sub({
code => sub { $any->([qw/GET POST/], @_) },
into => $pkg,
as => 'getpost',
});
}
__PACKAGE__;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment