From: Matt S Trout Date: Sun, 14 Nov 2010 19:41:49 +0000 (+0000) Subject: correct Sub::Quote docs X-Git-Tag: 0.009001~10 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FRole-Tiny.git;a=commitdiff_plain;h=005c00f2ef9dcc135b1b728197e5814ca5b90f0e correct Sub::Quote docs --- diff --git a/lib/Sub/Quote.pm b/lib/Sub/Quote.pm index 07a7b11..215657d 100644 --- a/lib/Sub/Quote.pm +++ b/lib/Sub/Quote.pm @@ -185,24 +185,32 @@ code. See the L's C for an example using captures. =item * no_install B. Set this option to not install the generated coderef into the -passed subroutine. +passed subroutine name on undefer. =back =head2 unquote_sub - my $coderef = unquote_sub 'Foo::bar'; + my $coderef = unquote_sub $sub; Forcibly replace subroutine with actual code. Note that as many subs are unquoted at a time for performance reasons. This means that if you have a syntax error in one of your quoted subs you may find out when some other sub is unquoted. +If $sub is not a quoted sub, this is a no-op. + =head2 quoted_from_sub - my $coderef = quoted_from_sub 'Foo::bar'; + my $data = quoted_from_sub $sub; + + my ($name, $code, $captures, $compiled_sub) = @$data; + +Returns original arguments to quote_sub, plus the compiled version if this +sub has already been unquoted. -Returns quoted coderef based on subroutine name. +Note that $sub can be either the original quoted version or the compiled +version for convenience. =head2 inlinify