B-C
view release on metacpan or search on metacpan
ByteLoader/ppport.h view on Meta::CPAN
sv_pvutf8n||5.006000|
sv_pvutf8||5.006000|
sv_pv||5.006000|
sv_recode_to_utf8||5.007003|
sv_reftype|||
sv_ref|||
sv_replace|||
sv_report_used|||
sv_resetpvn|||
sv_reset|||
sv_rvweaken||5.006000|
sv_sethek|||
sv_setiv_mg|5.004050||p
sv_setiv|||
sv_setnv_mg|5.006000||p
sv_setnv|||
sv_setpv_mg|5.004050||p
sv_setpvf_mg_nocontext|||pvn
sv_setpvf_mg|5.006000|5.004000|pv
sv_setpvf_nocontext|||vn
sv_setpvf||5.004000|v
Added test 45 (Nick Koston)
1.25 2010-04-11 rurban
* C.pm: remove global my_perl, pass it properly around.
* t/c*.t: added test 40 \000 byte in PV failing on ori 5.6.2 (Nick Koston),
added more magic tests for shared vars - n,p,P magic: 39-43. 41 nyi
* t/modules.t: fix -t (run module tests), print header only on full test
* t/modules.pm: do not test core or deprecated modules, esp. do not download perl
Added is_subset.
* t/testm.sh: implement -k
* t/testc.sh, t/TESTS: add 44 for weaken import and magic_killbackrefs #72922
1.24 2010-02-15 rurban
* C.pm: Fixed off by one array access in magic array init (34)
- valgrind is your friend.
Fixed aelemfast padsv access crash (Text::Tabs on freebsd7)
Fixed wrong stash names in gv_stashpv analog to gv_fetchpv
(Text-Tabs+Wrap t/dandv.t)
* t/testm.sh: implement -s without log file
* t/modules.pm: export skip_modules, silence module scanning STDERR
ramblings/magic view on Meta::CPAN
sv.c
ref loops:
For certain magics the sv == obj - a "magic reference loop":
arylen, symtab, tiedscalar, .... There the obj refcount is
not incremented.
sv_setsv()
Doing sv_setsv(dstr, gv) gives '*' magic to dstr with
obj = dstr, name = GvNAME, namlen = GvNAMELEN.
sv_setsv_flags()
Set vstring on SvVSTRING_mg (RMAGIC)
sv_rvweaken()
tiedscalar weakens the RV obj to the PVIO. Sets a backref magic
to the referred SV.
util.c
fbm_compile()
The PVBM gets 'B' magic with obj = name = namlen = 0 and SvVALID
is set to indicate that the Boyer-Moore table is valid.
magic_setbm() just clears the SvVALID flag.
hv_magic()
use threads::shared;my %h : shared; print "ok"
>>>
ok
#### 42 P-magic ####
# Aggregate element, n + p magic
use threads::shared;my @a : shared; $a[0]="ok"; print $a[0]
>>>
ok
#### 43 n+p magic ####
# perl #72922 (5.11.4 fails with magic_killbackrefs)
use Scalar::Util "weaken";my $re1=qr/foo/;my $re2=$re1;weaken($re2);print "ok" if $re3=qr/$re1/;
>>>
ok
#### 44 weaken not imported ####
use Data::Dumper ();Data::Dumper::Dumpxs({});print "ok";
>>>
ok
#### 45 test dynamic loading ####
use Exporter; print q(ok) if %main::Exporter::
>>>
ok
#### 46 Exporter:: store stashes only with -fstash. issue 79. ####
@ISA=(q(ok));print $ISA[0];
>>>
#usethreads="`$PERL -MConfig -e'print ($Config{useithreads} ? q(use threads;) : q())'`"
#usethreads='BEGIN{use Config; unless ($Config{useithreads}) {print "ok"; exit}} '
#;threads->create(sub{$s="ok"})->join;
# not yet testing n, only P
tests[41]=$usethreads'use threads::shared;{my $s="ok";share($s);print $s}'
# Shared aggregate, P magic
tests[42]=$usethreads'use threads::shared;my %h : shared; print "ok"'
# Aggregate element, n + p magic
tests[43]=$usethreads'use threads::shared;my @a : shared; $a[0]="ok"; print $a[0]'
# perl #72922 (5.11.4 fails with magic_killbackrefs)
tests[44]='use Scalar::Util "weaken";my $re1=qr/foo/;my $re2=$re1;weaken($re2);print "ok" if $re3=qr/$re1/;'
# test dynamic loading
tests[45]='use Data::Dumper ();Data::Dumper::Dumpxs({});print "ok";'
# issue 79: Exporter:: stash missing in main::
#tests[46]='use Exporter; if (exists $main::{"Exporter::"}) { print "ok"; }'
tests[46]='use Exporter; print "ok" if %main::Exporter::'
#tests[46]='use Exporter; print "ok" if scalar(keys(%main::Exporter::)) > 2'
# non-tied av->MAGICAL
tests[47]='@ISA=(q(ok));print $ISA[0];'
# END block del_backref with bytecode only
tests[48]='my $s=q{ok};END{print $s}'
t/testcc.sh view on Meta::CPAN
#usethreads="`$PERL -MConfig -e'print ($Config{useithreads} ? q(use threads;) : q())'`"
#usethreads='BEGIN{use Config; unless ($Config{useithreads}) {print "ok"; exit}} '
#;threads->create(sub{$s="ok"})->join;
# not yet testing n, only P
tests[41]=$usethreads'use threads::shared;{my $s="ok";share($s);print $s}'
# Shared aggregate, P magic
tests[42]=$usethreads'use threads::shared;my %h : shared; print "ok"'
# Aggregate element, n + p magic
tests[43]=$usethreads'use threads::shared;my @a : shared; $a[0]="ok"; print $a[0]'
# perl #72922 (5.11.4 fails with magic_killbackrefs)
tests[44]='use Scalar::Util "weaken";my $re1=qr/foo/;my $re2=$re1;weaken($re2);print "ok" if $re3=qr/$re1/;'
# test dynamic loading
tests[45]='use Data::Dumper ();Data::Dumper::Dumpxs({});print "ok";'
# issue 79: Exporter:: stash missing in main::
#tests[46]='use Exporter; if (exists $main::{"Exporter::"}) { print "ok"; }'
tests[46]='use Exporter; print "ok" if %main::Exporter::'
#tests[46]='use Exporter; print "ok" if scalar(keys(%main::Exporter::)) > 2'
# non-tied av->MAGICAL
tests[47]='@ISA=(q(ok));print $ISA[0];'
# END block del_backref with bytecode only
tests[48]='my $s=q{ok};END{print $s}'
t/testplc.sh view on Meta::CPAN
usethreads="`$PERL -MConfig -e'print ($Config{useithreads} ? q(use threads;) : q())'`"
#usethreads='BEGIN{use Config; unless ($Config{useithreads}) {print "ok"; exit}} '
#;threads->create(sub{$s="ok"})->join;
# not yet testing n, only P
tests[41]=$usethreads'use threads::shared;{my $s="ok";share($s);print $s}'
# Shared aggregate, P magic
tests[42]=$usethreads'use threads::shared;my %h : shared; print "ok"'
# Aggregate element, n + p magic
tests[43]=$usethreads'use threads::shared;my @a : shared; $a[0]="ok"; print $a[0]'
# perl #72922 (5.11.4 fails with magic_killbackrefs)
tests[44]='use Scalar::Util "weaken";my $re1=qr/foo/;my $re2=$re1;weaken($re2);print "ok" if $re3=qr/$re1/;'
# test dynamic loading
tests[45]='use Data::Dumper ();Data::Dumper::Dumpxs({});print "ok";'
# issue 79: Exporter:: stash missing in main::
#tests[46]='use Exporter; if (exists $main::{"Exporter::"}) { print "ok"; }'
tests[46]='use Exporter; print "ok" if %main::Exporter::'
#tests[46]='use Exporter; print "ok" if scalar(keys(%main::Exporter::)) > 2'
# non-tied av->MAGICAL
tests[47]='@ISA=(q(ok));print $ISA[0];'
# END block del_backref with bytecode only
tests[48]='my $s=q{ok};END{print $s}'
( run in 0.931 second using v1.01-cache-2.11-cpan-65fba6d93b7 )