Python::Decorator filtered the source into:
-------------------------------
use Carp qw(confess);

my $st = q/
@thisisnotarealdecorator
sub foo {
   1;
}
/;

sub loginout {
    my $f = shift;
    return sub {
	print "entering sub\n";
	&$f(@_);
	print "leaving sub\n";
    };
}


{ no strict "refs"; *{__PACKAGE__."::foo"} = loginout( sub  {
    print "running foo()\n";
} ); }

foo();
-------------------------------
entering sub
running foo()
leaving sub
