in reply to Intercept any changes to the sv_refcnt/SvREFCNT of an object
Can't, short of making changes to the Perl source.
#define SvREFCNT(sv) (sv)->sv_refcnt #define SvREFCNT_inc(sv) ((PL_Sv=MUTABLE_SV(sv)) ? (++(SvREFCNT(PL_Sv) +),PL_Sv) : NULL)
As you can see,
SvREFCNT_inc(sv)
boils down to
++( (sv)->sv_refcnt )
What's the bigger picture?
|
|---|