Anonymous-Object
view release on metacpan or search on metacpan
t/Anonymous-Object.t view on Meta::CPAN
use Test::More;
use strict;
use warnings;
our ( $sub, $globref );
BEGIN {
use_ok('Anonymous::Object');
$sub = sub { };
$globref = \*globref;
}
subtest 'new' => sub {
plan tests => 7;
ok( my $obj = Anonymous::Object->new( {} ),
q{my $obj = Anonymous::Object->new({})}
);
ok( $obj = Anonymous::Object->new(), q{$obj = Anonymous::Object->new()} );
isa_ok( $obj, 'Anonymous::Object' );
ok( $obj = Anonymous::Object->new(
{ meta => { 'test' => 'test' } }
( run in 1.047 second using v1.01-cache-2.11-cpan-49f99fa48dc )