diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-06-30 17:28:45 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-06-30 17:28:45 +0000 |
commit | be41e5d9d9cfcfb109a0aa6168e91932d29ac79e (patch) | |
tree | f20ee1a3068924bc6b102f454a2feac379bba37e /perl.c | |
parent | ec3bab8e3bf51c4a5f1cb8ab2f17c1c54f83967b (diff) | |
download | perl-be41e5d9d9cfcfb109a0aa6168e91932d29ac79e.tar.gz |
A terser way of implementing require_pv.
p4raw-id: //depot/perl@25029
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -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; } |