Skip to content

Commit 4b0fe64

Browse files
author
Todd Rinaldo
committed
Make SVf_ROK clarify what module it was found in
1 parent 4453a27 commit 4b0fe64

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

lib/B/C/OverLoad/B/AV.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ sub do_save ( $av, $fullname = undef, $cv = undef, $is_backref = 0 ) {
7373

7474
# Skip FLAGS check for PAD modules that use AV as parent since calling flags for those is meaningless
7575
unless ( ref($av) =~ /^B::PAD(?:LIST|NAMELIST)$/ ) {
76-
$av->FLAGS & 2048 and die sprintf( "Unexpected SVf_ROK found in %s\n", ref $av );
76+
$av->FLAGS & 2048 and die sprintf( "In B::AV, unexpected SVf_ROK found in %s\n", ref $av );
7777
}
7878
$fullname ||= '';
7979

lib/B/C/OverLoad/B/CV.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ sub do_save ( $cv, $origname = undef ) {
3030
# do not save BEGIN and CHECK functions
3131
return 'NULL' if $fullname =~ qr{::(?:BEGIN|CHECK|UNITCHECK)$};
3232

33-
$cv->FLAGS & 2048 and die sprintf( "Unexpected SVf_ROK found in %s\n", ref $cv );
33+
$cv->FLAGS & 2048 and die sprintf( "In B::CV, unexpected SVf_ROK found in %s\n", ref $cv );
3434

3535
my $is_xs_accessor_constructor = $cv->is_xs_accessor_constructor;
3636
my ( $xsaccessor_list, $xsaccessor_function, $xsaccessor_key, $xsaccessor_key_len ) = $cv->save_xs_accessor($is_xs_accessor_constructor);

lib/B/C/OverLoad/B/GV.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ our @under = ();
2323

2424
sub do_save ( $gv, $name = undef ) {
2525

26-
$gv->FLAGS & 2048 and die sprintf( "Unexpected SVf_ROK found in %s\n", ref $gv );
26+
$gv->FLAGS & 2048 and die sprintf( "In B::GV, unexpected SVf_ROK found in %s\n", ref $gv );
2727

2828
if ( $gv->get_fullname =~ qr{::(?:BEGIN|CHECK|UNITCHECK)$} ) {
2929

lib/B/C/OverLoad/B/HV.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ sub do_save ( $hv, $fullname = undef ) {
8585

8686
$fullname ||= '';
8787
my $stash_name = $hv->NAME;
88-
$hv->FLAGS & 2048 and die sprintf( "Unexpected SVf_ROK found in %s\n", ref $hv );
88+
$hv->FLAGS & 2048 and die sprintf( "In B::HV, unexpected SVf_ROK found in %s\n", ref $hv );
8989

9090
#debug( hv => "XXXX HV fullname %s // name %s", $fullname, $stash_name );
9191
if ($stash_name) {

lib/B/C/OverLoad/B/IO.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ sub save_io_and_data ( $io, $globname, $is_utf8, $data ) {
2323

2424
sub do_save ( $io, $fullname = undef ) {
2525

26-
$io->FLAGS & 2048 and die sprintf( "Unexpected SVf_ROK found in %s\n", ref $io );
26+
$io->FLAGS & 2048 and die sprintf( "In B::IO, unexpected SVf_ROK found in %s\n", ref $io );
2727
my ( $ix, $sym ) = svsect()->reserve($io);
2828
svsect()->debug( $fullname, $io );
2929

lib/B/C/OverLoad/B/NV.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ sub do_save ( $sv, $fullname, $custom = undef ) {
1414

1515
my $svflags = $sv->FLAGS;
1616
my $refcnt = $sv->REFCNT;
17-
$sv->FLAGS & 2048 and die sprintf( "Unexpected SVf_ROK found in %s\n", ref $sv );
17+
$sv->FLAGS & 2048 and die sprintf( "In B::NV, unexpected SVf_ROK found in %s\n", ref $sv );
1818

1919
if ( ref $custom ) { # used when downgrading a PVIV / PVNV to IV
2020
$svflags = $custom->{flags} if defined $custom->{flags};

lib/B/C/OverLoad/B/REGEXP.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use B::C::Save qw/savecowpv/;
1111
# post 5.11: When called from B::RV::save not from PMOP::save precomp
1212
sub do_save ( $sv, $fullname = undef ) {
1313

14-
$sv->FLAGS & 2048 and die sprintf( "Unexpected SVf_ROK found in %s\n", ref $sv );
14+
$sv->FLAGS & 2048 and die sprintf( "In B::REGEXP, unexpected SVf_ROK found in %s\n", ref $sv );
1515

1616
my ( $ix, $sym ) = svsect()->reserve($sv);
1717
svsect()->debug( $sv->name, $sv );

lib/B/C/OverLoad/B/UV.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use B::C::Decimal qw/u32fmt/;
1010

1111
sub do_save ( $sv, $fullname = undef ) {
1212

13-
$sv->FLAGS & 2048 and die sprintf( "Unexpected SVf_ROK found in %s\n", ref $sv );
13+
$sv->FLAGS & 2048 and die sprintf( "In B::UV, unexpected SVf_ROK found in %s\n", ref $sv );
1414

1515
my ( $ix, $sym ) = svsect()->reserve($sv);
1616
svsect()->debug( $fullname, $sv );

0 commit comments

Comments
 (0)