On Mon, Jan 24, 2005 at 12:56:22PM -0800, Ovid wrote: > Well, OK. So I tried it: > > use Test::More qw/no_plan/; > use Test::Builder; > use Hook::LexWrap; > use Data::Dumper; > > wrap Test::Builder::ok ^ ^ comma missing
> pre => sub { die Dumper [EMAIL PROTECTED] }; Not sure why its not a syntax error but B::Deparse shows this: $ perl -MO=Deparse ~/tmp/foo.plx BEGIN { $^W = 1; } use Test::More ('no_plan'); use Test::Builder; use Hook::LexWrap; use Data::Dumper; &wrap('Test::Builder::ok'); ok 1, 'should be good'; is 2, 3, 'is 2 3 should be bad'; is 'foo', 'foo', 'and this should be good'; /Users/schwern/tmp/foo.plx syntax OK Looks like its something weird about the typeglob prototype. #!/usr/bin/perl -w sub foo {} sub wrap (*) { } wrap foo pre => sub { print "Args: @_\n" }; $ perl -MO=Deparse ~/tmp/foo.plx BEGIN { $^W = 1; } sub foo { } sub wrap (*) { } &wrap('foo'); /Users/schwern/tmp/foo.plx syntax OK