Commit | Line | Data |
---|---|---|
823edd99 | 1 | #!./perl -w |
2 | ||
3 | BEGIN { | |
4 | chdir 't' if -d 't'; | |
5 | @INC = '../lib' if -d '../lib'; | |
6 | } | |
7 | ||
8 | use Data::Dumper; | |
9 | ||
10 | print "1..1\n"; | |
11 | ||
12 | package Foo; | |
13 | use overload '""' => 'as_string'; | |
14 | ||
15 | sub new { bless { foo => "bar" }, shift } | |
16 | sub as_string { "%%%%" } | |
17 | ||
18 | package main; | |
19 | ||
20 | my $f = Foo->new; | |
21 | ||
22 | print "#\$f=$f\n"; | |
23 | ||
24 | $_ = Dumper($f); | |
25 | s/^/#/mg; | |
26 | print $_; | |
27 | ||
28 | print "not " unless /bar/ && /Foo/; | |
29 | print "ok 1\n"; | |
30 |