Guest User

Untitled

a guest
May 27th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #!/usr/bin/perl
  2.  
  3. use strict;
  4. use warnings;
  5.  
  6. use Test::Most qw{no_plan};
  7. use Carp::Always;
  8.  
  9. #-----------------------------------------------------------------
  10. #
  11. #-----------------------------------------------------------------
  12. BEGIN {
  13. package My::Test;
  14. use Moose;
  15. sub thing {}
  16. around thing => sub{
  17. use Sub::Identify ':all';
  18. my $next = shift;
  19. my $self = shift;
  20.  
  21. return sub_name( $next );
  22. };
  23.  
  24.  
  25. };
  26. #-----------------------------------------------------------------
  27. #
  28. #-----------------------------------------------------------------
  29. ok( my $t = My::Test->new() );
  30. is( $t->thing, 'thing' );
Add Comment
Please, Sign In to add comment