#!/usr/bin/perl -w
use strict;
use Hook::LexWrap;
use Data::Dumper;
sub get { return "Foo!" }
wrap get, post => sub { print Dumper(\@_) };
my @n = get();
my $n = get();
get();
####
$VAR1 = [
[
'Foo!'
]
];
$VAR1 = [
'Foo!'
];
$VAR1 = [
bless( sub { "DUMMY" }, 'Hook::LexWrap::Cleanup' )
];
####
In a post-wrapper, $_[-1] contains the return value
produced by the wrapped subroutine. In a scalar return
context, this value is the scalar return value. In an
list return context, this value is a reference to the
array of return values. $_[-1] may be assigned to in a
post-wrapper, and this changes the return value accordingly.