SvGROW(err, SvCUR(err)+sizeof(prefix)+klen);
sv_catpvn(err, prefix, sizeof(prefix)-1);
sv_catpvn(err, message, klen);
- if (ckWARN(WARN_UNSAFE))
- warner(WARN_UNSAFE, SvPVX(err));
+ if (ckWARN(WARN_UNSAFE)) {
+ STRLEN start = SvCUR(err)-klen-sizeof(prefix)+1;
+ warner(WARN_UNSAFE, SvPVX(err)+start);
+ }
}
sv_inc(*svp);
}
package Foo;
DESTROY { die "@{$_[0]} foo bar" }
{ bless ['A'], 'Foo' for 1..10 }
+{ bless ['B'], 'Foo' for 1..10 }
EXPECT
(in cleanup) A foo bar at - line 4.
+ (in cleanup) B foo bar at - line 4.