use warnings;
use 5.008001;
-our $VERSION = '0.002000';
+our $VERSION = '0.003003';
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;
bootstrap Devel::Declare;
no strict 'refs';
my ($pack, $pname) = ($name =~ m/(.+)::([^:]+)/);
push(@$temp_save, $pack->can($pname));
- delete ${"${pack}::"}{$pname};
no warnings 'redefine';
no warnings 'prototype';
*{$name} = $cr;
=head1 NAME
-Devel::Declare -
+Devel::Declare - Adding keywords to perl, in perl
=head1 SYNOPSIS
use Devel::Declare ();
- use Scope::Guard;
{
package MethodHandlers;
use strict;
use warnings;
+ use B::Hooks::EndOfScope;
our ($Declarator, $Offset);
}
sub inject_scope {
- $^H |= 0x120000;
- $^H{DD_METHODHANDLERS} = Scope::Guard->new(sub {
+ on_scope_end {
my $linestr = Devel::Declare::get_linestr;
my $offset = Devel::Declare::get_linestr_offset;
substr($linestr, $offset, 0) = ';';
Devel::Declare::set_linestr($linestr);
- });
+ };
}
}
Currently valid op types: 'check', 'rv2cv'
-=head1 AUTHOR
+=head1 AUTHORS
Matt S Trout - <mst@shadowcat.co.uk>
Company: http://www.shadowcat.co.uk/
Blog: http://chainsawblues.vox.com/
+Florian Ragwitz E<lt>rafl@debian.orgE<gt>
+
=head1 LICENSE
This library is free software under the same terms as perl itself