Commit | Line | Data |
f4a2945e |
1 | BEGIN { |
2 | chdir 't' if -d 't'; |
3 | @INC = '../lib'; |
4 | } |
5 | |
6 | use Scalar::Util qw(blessed); |
7 | use vars qw($t $y $x); |
8 | |
9 | print "1..7\n"; |
10 | |
11 | print "not " if blessed(1); |
12 | print "ok 1\n"; |
13 | |
14 | print "not " if blessed('A'); |
15 | print "ok 2\n"; |
16 | |
17 | print "not " if blessed({}); |
18 | print "ok 3\n"; |
19 | |
20 | print "not " if blessed([]); |
21 | print "ok 4\n"; |
22 | |
23 | $y = \$t; |
24 | |
25 | print "not " if blessed($y); |
26 | print "ok 5\n"; |
27 | |
28 | $x = bless [], "ABC"; |
29 | |
30 | print "not " unless blessed($x); |
31 | print "ok 6\n"; |
32 | |
33 | print "not " unless blessed($x) eq 'ABC'; |
34 | print "ok 7\n"; |