Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 0ccb26a8b6
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (19 sloc) 0.518 kB
#!perl -w
use strict;
use if ($] >= 5.011), 'Test::More', 'skip_all' => 'This test is for old perls';
use Test::More tests => 4;
use Test::Exception;
use Data::Util qw(get_code_info install_subroutine);
use Attribute::Handlers;
sub UNIVERSAL::Foo :ATTR(CODE, BEGIN){
my($pkg, $sym, $subr) = @_;
lives_ok{
scalar get_code_info($subr);
} 'get_code_info()';
lives_ok{
no warnings 'redefine';
install_subroutine 'main', 'foo', $subr;
} 'install_subroutine()';
}
sub f :Foo;
my $anon = sub :Foo {};
Jump to Line
Something went wrong with that request. Please try again.