X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDevel%2FDeclare.pm;h=4ea6efb14028c3f1629124b53c08d47c1781be46;hb=dfd7e678f3e7e1626b87cc3c908aa7ccd7196bdd;hp=ed296868a7100e80a3d7308683f63bc0067aa8a1;hpb=78bb475dd0c334ce6f507f501d7b9e1d8cbd8b0b;p=p5sagit%2FDevel-Declare.git diff --git a/lib/Devel/Declare.pm b/lib/Devel/Declare.pm index ed29686..4ea6efb 100644 --- a/lib/Devel/Declare.pm +++ b/lib/Devel/Declare.pm @@ -1,10 +1,11 @@ package Devel::Declare; +# ABSTRACT: Adding keywords to perl, in perl use strict; use warnings; use 5.008001; -our $VERSION = '0.006006'; +our $VERSION = '0.006016'; use constant DECLARE_NAME => 1; use constant DECLARE_PROTO => 2; @@ -20,6 +21,8 @@ bootstrap Devel::Declare; @ISA = (); +initialize(); + sub import { my ($class, %args) = @_; my $target = caller; @@ -469,6 +472,10 @@ This builtin returns the full text of the current line of the source document. =head4 C This builtin sets the full text of the current line of the source document. +Beware that injecting a newline into the middle of the line is likely +to fail in surprising ways. Generally, Perl's parser can rely on the +`current line' actually being only a single line. Use other kinds of +whitespace instead, in the code that you inject. =head3 C @@ -529,6 +536,10 @@ can't reliably get this from the buffer. In fact, after the function returns, you can't rely on any content of the buffer preceding the end of the string. +If the string being scanned is not well formed (has no closing delimiter), +C returns C. In this case you cannot rely on the +contents of the buffer. + =head4 C This builtin returns what was matched by C. To avoid segfaults,