Version 0.003003.
[p5sagit/Devel-Declare.git] / lib / Devel / Declare.pm
index 6280eec..759bed7 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 use 5.008001;
 
-our $VERSION = '0.002000';
+our $VERSION = '0.003003';
 
 use constant DECLARE_NAME => 1;
 use constant DECLARE_PROTO => 2;
@@ -97,7 +97,6 @@ sub shadow_sub {
   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;
@@ -286,18 +285,18 @@ sub linestr_callback {
 
 =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);
   
@@ -392,13 +391,12 @@ Devel::Declare -
     }
   
     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);
-      });
+      };
     }
   }
   
@@ -486,13 +484,15 @@ Devel::Declare -
 
 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