Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

package Z;
use Devel::Peek ();
use overload "+"=>sub {42};
die "fail" unless 42 == bless({}) + 1;
Devel::Peek::Dump \%Z::;
use Inline C => <<END;
void foo(SV* targ) {
if (!SvOK(targ)) return;
if (SvROK(targ)) targ = SvRV(targ);