trial build using unreleased [MakeMaker::Fallback] that adds PL_FILES=>{}
[p5sagit/Object-Tap.git] / t / 01basic.t
CommitLineData
9e15d0fb 1use strict;
2use warnings FATAL => 'all';
3use Test::More qw(no_plan);
4use Object::Tap;
5
6my $tapped;
7
8sub Foo::bar { $tapped = join(' ', @_) }
9
10is(Foo->$_tap(sub { $_[0]->bar($_[1]) }, 'one'), 'Foo', 'invocant returned');
11
12is($tapped, 'Foo one', 'subref tap');
13
14is(Foo->$_tap(bar => 'two'), 'Foo', 'invocant returned');
15
16is($tapped, 'Foo two', 'method name tap');