summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-07-11 19:11:18 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-07-11 19:11:18 +0000
commitbe3174d2532d82826fc0aa416a83ef8ce0f07732 (patch)
treedcb2f29d4e1d0a6db01d7d1c2c96304de9c13b8d /op.c
parent5e5f20b507b6c3b7749b1f2f6cfd8a156eca9deb (diff)
downloadperl-be3174d2532d82826fc0aa416a83ef8ce0f07732.tar.gz
integrate cfgperl changes#6268..6282 into mainline
p4raw-link: @6282 on //depot/cfgperl: d4817f5b97d4072a6efac47844b617245b179f2c p4raw-link: @6268 on //depot/cfgperl: 22e04bdb3a09a4c369fd1666143349eab2eba9d4 p4raw-id: //depot/perl@6366 p4raw-integrated: from //depot/cfgperl@6365 'copy in' lib/Net/Ping.pm lib/Text/Wrap.pm t/lib/dprof.t t/lib/dumper-ovl.t t/lib/hostname.t (@5586..) lib/Pod/Html.pm (@5608..) t/lib/ipc_sysv.t (@5812..) t/lib/dumper.t (@5972..) ext/File/Glob/Glob.pm (@6026..) lib/Pod/Man.pm lib/Pod/Text.pm (@6034..) t/lib/anydbm.t (@6072..) lib/ExtUtils/xsubpp (@6156..) pod/perlsub.pod pod/perltie.pod (@6206..) utils/h2xs.PL (@6280..) p4raw-integrated: from //depot/cfgperl@6282 'merge in' vms/vms.c (@6238..) p4raw-integrated: from //depot/cfgperl@6277 'copy in' pod/perlfunc.pod (@6276..) p4raw-integrated: from //depot/cfgperl@6273 'ignore' perlapi.h (@6243..) embedvar.h (@6254..) 'merge in' perlapi.c (@6243..) embed.h (@6254..) embed.pl objXSUB.h op.c proto.h (@6269..) p4raw-integrated: from //depot/cfgperl@6270 'copy in' t/op/taint.t (@5857..) p4raw-integrated: from //depot/cfgperl@6269 'copy in' doop.c (@6263..) 'ignore' toke.c (@6261..) p4raw-integrated: from //depot/cfgperl@6268 'copy in' t/op/sprintf.t (@6267..)
Diffstat (limited to 'op.c')
-rw-r--r--op.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/op.c b/op.c
index 3f71cfa355..f1fe50bc87 100644
--- a/op.c
+++ b/op.c
@@ -1851,6 +1851,37 @@ S_apply_attrs(pTHX_ HV *stash, SV *target, OP *attrs)
LEAVE;
}
+void
+Perl_apply_attrs_string(pTHX_ char *stashpv, CV *cv,
+ char *attrstr, STRLEN len)
+{
+ OP *attrs = Nullop;
+
+ if (!len) {
+ len = strlen(attrstr);
+ }
+
+ while (len) {
+ for (; isSPACE(*attrstr) && len; --len, ++attrstr) ;
+ if (len) {
+ char *sstr = attrstr;
+ for (; !isSPACE(*attrstr) && len; --len, ++attrstr) ;
+ attrs = append_elem(OP_LIST, attrs,
+ newSVOP(OP_CONST, 0,
+ newSVpvn(sstr, attrstr-sstr)));
+ }
+ }
+
+ Perl_load_module(aTHX_ PERL_LOADMOD_IMPORT_OPS,
+ newSVpvn(ATTRSMODULE, sizeof(ATTRSMODULE)-1),
+ Nullsv, prepend_elem(OP_LIST,
+ newSVOP(OP_CONST, 0, newSVpv(stashpv,0)),
+ prepend_elem(OP_LIST,
+ newSVOP(OP_CONST, 0,
+ newRV((SV*)cv)),
+ attrs)));
+}
+
STATIC OP *
S_my_kid(pTHX_ OP *o, OP *attrs)
{