This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec3bab8
)
A terser way of implementing require_pv.
author
Nicholas Clark
<nick@ccl4.org>
Thu, 30 Jun 2005 17:28:45 +0000
(17:28 +0000)
committer
Nicholas Clark
<nick@ccl4.org>
Thu, 30 Jun 2005 17:28:45 +0000
(17:28 +0000)
p4raw-id: //depot/perl@25029
perl.c
patch
|
blob
|
blame
|
history
diff --git
a/perl.c
b/perl.c
index
57a9471
..
5d5ec62
100644
(file)
--- a/
perl.c
+++ b/
perl.c
@@
-2719,11
+2719,8
@@
Perl_require_pv(pTHX_ const char *pv)
dSP;
PUSHSTACKi(PERLSI_REQUIRE);
PUTBACK;
- sv = sv_newmortal();
- sv_setpv(sv, "require '");
- sv_catpv(sv, pv);
- sv_catpv(sv, "'");
- eval_sv(sv, G_DISCARD);
+ sv = Perl_newSVpvf(aTHX_ "require q%c%s%c", 0, pv, 0);
+ eval_sv(sv_2mortal(sv), G_DISCARD);
SPAGAIN;
POPSTACK;
}