projects
/
gitmo/Moose.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Tidy existing code
[gitmo/Moose.git]
/
t
/
bugs
/
constructor_object_overload.t
1
#!/usr/bin/perl
2
use strict;
3
use warnings;
4
use Test::More;
5
6
{
7
package Foo;
8
9
use Moose;
10
11
use overload '""' => sub {''};
12
13
sub bug { 'plenty' }
14
15
__PACKAGE__->meta->make_immutable;
16
}
17
18
ok(Foo->new()->bug(), 'call constructor on object reference with overloading');
19
20
done_testing;