- or download this
SV * overload_add_eq(SV * obj, SV * addon, SV * third) {
Card* c = (Card *)SvIV(SvRV(obj));
...
c->value += SvIV(addon);
return obj;
}
- or download this
void overload_add_eq(SV * obj, SV * addon, SV * third) {
Card* c = (Card *)SvIV(SvRV(obj));
c->value += SvIV(addon);
}
- or download this
use warnings;
package My_struct;
...
@members = deref_ref($obj);
print "@members\n";