]> git.vpit.fr Git - perl/modules/B-RecDeparse.git/commitdiff
Also handle srefgen ops rt99809
authorFather Chrysostomos <sprout@cpan.org>
Thu, 12 Mar 2015 13:53:40 +0000 (10:53 -0300)
committerVincent Pit <vince@profvince.com>
Thu, 12 Mar 2015 13:53:40 +0000 (10:53 -0300)
So that \&foo is correctly deparsed on perl 5.21.5+.

This fixes RT #99809.

lib/B/RecDeparse.pm
t/92-pod-coverage.t

index 03c7effab49656a8701e6f6ff2360caa6f84545a..202cf789d77d317262ac118af266cb3c5aef5442 100644 (file)
@@ -190,6 +190,15 @@ sub pp_refgen {
  }
 }
 
+sub pp_srefgen {
+ my $self = shift;
+
+ return do {
+  local $self->{brd_sub} = 0;
+  $self->SUPER::pp_srefgen(@_);
+ }
+}
+
 sub pp_gv {
  my $self = shift;
 
@@ -248,6 +257,10 @@ C<pp_refgen>
 
 =item *
 
+C<pp_srefgen>
+
+=item *
+
 C<pp_gv>
 
 =back
index 6117808a805e7aba2ddd83981fa15242db99439c..6b54d62f432e377d97270b87103cacc91d82974e 100644 (file)
@@ -19,5 +19,6 @@ all_pod_coverage_ok({
   pp_entersub
   pp_gv
   pp_refgen
+  pp_srefgen
  > ],
 });