summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-09-26 14:24:20 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-09-26 14:24:20 +0000
commitd588972218452be2a52ffc42d861cd8feacb6726 (patch)
treef294a384b54de606df0fcf2af7c4a5afc33f6bf7 /ext
parent6b514a0d693c3972afe865013c60b5994c1c323c (diff)
downloadperl-d588972218452be2a52ffc42d861cd8feacb6726.tar.gz
Make B::Deparse handle correctly CORE::require
p4raw-id: //depot/perl@25601
Diffstat (limited to 'ext')
-rw-r--r--ext/B/B/Deparse.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/B/B/Deparse.pm b/ext/B/B/Deparse.pm
index 5473b407da..3db6fbe6e1 100644
--- a/ext/B/B/Deparse.pm
+++ b/ext/B/B/Deparse.pm
@@ -19,7 +19,7 @@ use B qw(class main_root main_start main_cv svref_2object opnumber perlstring
CVf_METHOD CVf_LOCKED CVf_LVALUE CVf_ASSERTION
PMf_KEEP PMf_GLOBAL PMf_CONTINUE PMf_EVAL PMf_ONCE PMf_SKIPWHITE
PMf_MULTILINE PMf_SINGLELINE PMf_FOLD PMf_EXTENDED);
-$VERSION = 0.70;
+$VERSION = 0.71;
use strict;
use vars qw/$AUTOLOAD/;
use warnings ();
@@ -1680,15 +1680,16 @@ sub pp_delete {
sub pp_require {
my $self = shift;
my($op, $cx) = @_;
+ my $opname = $op->flags & OPf_SPECIAL ? 'CORE::require' : 'require';
if (class($op) eq "UNOP" and $op->first->name eq "const"
and $op->first->private & OPpCONST_BARE)
{
my $name = $self->const_sv($op->first)->PV;
$name =~ s[/][::]g;
$name =~ s/\.pm//g;
- return "require $name";
+ return "$opname $name";
} else {
- $self->unop($op, $cx, "require");
+ $self->unop($op, $cx, $opname);
}
}