use warnings;
use 5.008001;
-our $VERSION = '0.005002';
+our $VERSION = '0.006006';
use constant DECLARE_NAME => 1;
use constant DECLARE_PROTO => 2;
use vars qw(%declarators %declarator_handlers @ISA);
use base qw(DynaLoader);
use Scalar::Util 'set_prototype';
-use B::Hooks::OP::Check;
+use B::Hooks::OP::Check 0.19;
bootstrap Devel::Declare;
Also it Does The Right Thing with nested delimiters (like C<q(this (is (a) quote))>).
-It returns the length of the expression matched. Use C<get_lex_stuff> to
-get the actual matched text.
+It returns the effective length of the expression matched. Really, what
+it returns is the difference in position between where the string started,
+within the buffer, and where it finished. If the string extended across
+multiple lines then the contents of the buffer may have been completely
+replaced by the new lines, so this position difference is not the same
+thing as the actual length of the expression matched. However, because
+moving backward in the buffer causes problems, the function arranges
+for the effective length to always be positive, padding the start of
+the buffer if necessary.
+
+Use C<get_lex_stuff> to get the actual matched text, the content of
+the string. Because of the behaviour around multiline strings, you
+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<toke_scan_str> returns C<undef>. In this case you cannot rely on the
+contents of the buffer.
=head4 C<get_lex_stuff>
return ' BEGIN { MethodHandlers::inject_scope }; ';
}
-So at the beginning of every method, we assing a callback that will get invoked
+So at the beginning of every method, we are passing a callback that will get invoked
at the I<end> of the method's compilation... i.e. exactly then the closing C<'}'>
is compiled.
=head1 AUTHORS
-Matt S Trout - <mst@shadowcat.co.uk> - original author
+Matt S Trout - E<lt>mst@shadowcat.co.ukE<gt> - original author
Company: http://www.shadowcat.co.uk/
Blog: http://chainsawblues.vox.com/
osfameron E<lt>osfameron@cpan.orgE<gt> - first draft of documentation
-=head1 LICENSE
+=head1 COPYRIGHT AND LICENSE
This library is free software under the same terms as perl itself
+Copyright (c) 2007, 2008, 2009 Matt S Trout
+
+Copyright (c) 2008, 2009 Florian Ragwitz
+
+stolen_chunk_of_toke.c based on toke.c from the perl core, which is
+
+Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+2000, 2001, 2002, 2003, 2004, 2005, 2006, by Larry Wall and others
+
=cut
1;