Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save notbenh/432277 to your computer and use it in GitHub Desktop.
Save notbenh/432277 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
use Test::Most qw{no_plan};
use Carp::Always;
#-----------------------------------------------------------------
#
#-----------------------------------------------------------------
BEGIN {
package My::Test;
use Moose;
sub thing {}
around thing => sub{
use Sub::Identify ':all';
my $next = shift;
my $self = shift;
return sub_name( $next );
};
};
#-----------------------------------------------------------------
#
#-----------------------------------------------------------------
ok( my $t = My::Test->new() );
is( $t->thing, 'thing' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment