in reply to Re: New Module Announcement: Object::InsideOut
in thread New Module Announcement: Object::InsideOut
However, all other forms of object deferencing through overloading are supported: Stringify, numerify, boolify, arrayify, hashify, globify and codify. Object::InsideOut simplifies defining these operations through the use of subroutine attributes. For example, your code would become:
use Test::More 'no_plan'; package Foo::Bar; { use Object::InsideOut; sub numify :Numerify { 42 } } package main; my $obj = Foo::Bar->new(); is(0 + $obj, 42);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: New Module Announcement: Object::InsideOut
by diotalevi (Canon) on Nov 03, 2005 at 21:28 UTC | |
by jdhedden (Deacon) on Nov 04, 2005 at 13:11 UTC | |
by Aristotle (Chancellor) on Nov 04, 2005 at 14:17 UTC | |
by jdhedden (Deacon) on Jan 10, 2006 at 15:40 UTC |