package Devel::Declare;
+# ABSTRACT: (DEPRECATED) Adding keywords to perl, in perl
use strict;
use warnings;
use 5.008001;
-our $VERSION = '0.006006';
+our $VERSION = '0.006019';
use constant DECLARE_NAME => 1;
use constant DECLARE_PROTO => 2;
@ISA = ();
+initialize();
+
sub import {
my ($class, %args) = @_;
my $target = caller;
This document describes how to create a simple declarator.
+=head1 WARNING
+
+=for comment mst wrote this warning for MooseX::Declare, and ether adapted it for here:
+
+B<Warning:> Devel::Declare is a giant bag of crack
+originally implemented by mst with the goal of upsetting the perl core
+developers so much by its very existence that they implemented proper
+keyword handling in the core.
+
+As of perl5 version 14, this goal has been achieved, and modules such
+as L<Devel::CallParser>, L<Function::Parameters>, and L<Keyword::Simple> provide
+mechanisms to mangle perl syntax that don't require hallucinogenic
+drugs to interpret the error messages they produce.
+
+If you are using something that uses Devel::Declare, please for the love
+of kittens use something else:
+
+=over 4
+
+=item *
+
+Instead of L<TryCatch>, use L<Try::Tiny>
+
+=item *
+
+Instead of L<Method::Signatures>, use
+L<real subroutine signatures|perlsub/Signatures> (requires perl 5.22) or L<Moops>
+
+=back
+
=head1 USAGE
We'll demonstrate the usage of C<Devel::Declare> with a motivating example: a new
=head4 C<set_linestr>
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<skipspace>
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>
This builtin returns what was matched by C<toke_scan_str>. To avoid segfaults,