From: Karen Etheridge Date: Sat, 9 Aug 2014 04:00:04 +0000 (-0700) Subject: whitespace X-Git-Tag: v0.09~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a0f015f538bfe3a5a1eda54ac0b00bdff973cdd4;p=p5sagit%2FSub-Name.git whitespace --- diff --git a/lib/Sub/Name.pm b/lib/Sub/Name.pm index eabbc0d..7213465 100644 --- a/lib/Sub/Name.pm +++ b/lib/Sub/Name.pm @@ -18,15 +18,15 @@ This module has only one function, which is also exported by default: =head2 subname NAME, CODEREF -Assigns a new name to referenced sub. If package specification is omitted in +Assigns a new name to referenced sub. If package specification is omitted in the name, then the current package is used. The return value is the sub. -The name is only used for informative routines (caller, Carp, etc). You won't -be able to actually invoke the sub by the given name. To allow that, you need +The name is only used for informative routines (caller, Carp, etc). You won't +be able to actually invoke the sub by the given name. To allow that, you need to do glob-assignment yourself. -Note that for anonymous closures (subs that reference lexicals declared outside -the sub itself) you can name each instance of the closure differently, which +Note that for anonymous closures (subs that reference lexicals declared outside +the sub itself) you can name each instance of the closure differently, which can be very useful for debugging. =head1 AUTHOR @@ -35,7 +35,7 @@ Matthijs van Duin Copyright (C) 2004, 2008 Matthijs van Duin. All rights reserved. Copyright (C) 2014 cPanel Inc. All rights reserved. -This program is free software; you can redistribute it and/or modify +This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut diff --git a/t/RT42725_deparse.t b/t/RT42725_deparse.t index 7e61777..a10ce82 100644 --- a/t/RT42725_deparse.t +++ b/t/RT42725_deparse.t @@ -1,13 +1,12 @@ use strict; use warnings; -use Test::More tests => 2; +use Test::More tests => 2; use Sub::Name; - use B::Deparse; my $source = eval { - B::Deparse->new->coderef2text(subname foo => sub{ @_ }); + B::Deparse->new->coderef2text(subname foo => sub{ @_ }); }; ok !$@; diff --git a/t/smoke.t b/t/smoke.t index 79b8668..1e1c011 100644 --- a/t/smoke.t +++ b/t/smoke.t @@ -23,18 +23,18 @@ subname "Foo::Bar::Baz", $x; subname "subname (dynamic $_)", \&subname for 1 .. 3; for (4 .. 5) { - subname "Dynamic $_", $x; - ::is($x->(), "Blork::Dynamic $_"); + subname "Dynamic $_", $x; + ::is($x->(), "Blork::Dynamic $_"); } ::is($DB::sub{"main::foo"}, $anon); for (4 .. 5) { - ::is($DB::sub{"Blork::Dynamic $_"}, $anon); + ::is($DB::sub{"Blork::Dynamic $_"}, $anon); } for ("Blork:: Bar!", "Foo::Bar::Baz") { - ::is($DB::sub{$_}, $anon); + ::is($DB::sub{$_}, $anon); } ::done_testing;