Another pod fix.
[p5sagit/Devel-Declare.git] / lib / Devel / Declare.pm
index e6cdea8..938184a 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 use 5.008001;
 
-our $VERSION = '0.004000';
+our $VERSION = '0.005002';
 
 use constant DECLARE_NAME => 1;
 use constant DECLARE_PROTO => 2;
@@ -580,10 +580,9 @@ These will then get rewritten as
 where 'method' is a subroutine that takes a code block.  Spot the problem?
 The first one doesn't have a semicolon at the end of it!  Unlike 'sub' which
 is a builtin, this is just a normal statement, so we need to terminate it.
-Luckily, using the bastard spawn of L<Scope::Guard> and some hints hash
-hackery, we can do this!
+Luckily, using C<B::Hooks::EndOfScope>, we can do this!
 
-  use Scope::Guard;
+  use B::Hooks::EndOfScope;
 
 We'll add this to what gets 'injected' at the beginning of the method source.
 
@@ -596,13 +595,12 @@ at the I<end> of the method's compilation... i.e. exactly then the closing C<'}'
 is compiled.
 
   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);
-    });
+    };
   }
 
 =head2 Shadowing each method.
@@ -651,14 +649,14 @@ L<http://cpants.perl.org/dist/used_by/Devel-Declare>.
 
 =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/
 
 Florian Ragwitz E<lt>rafl@debian.orgE<gt> - maintainer
 
-osfameron E<lt>osfameron@cpan.org<gt> - first draft of documentation
+osfameron E<lt>osfameron@cpan.orgE<gt> - first draft of documentation
 
 =head1 LICENSE