1N/A#!./perl
1N/A
1N/ABEGIN {
1N/A unless (-d 'blib') {
1N/A chdir 't' if -d 't';
1N/A @INC = '../lib';
1N/A require Config; import Config;
1N/A keys %Config; # Silence warning
1N/A if ($Config{extensions} !~ /\bList\/Util\b/) {
1N/A print "1..0 # Skip: List::Util was not built\n";
1N/A exit 0;
1N/A }
1N/A }
1N/A}
1N/A
1N/Ause Scalar::Util qw(blessed);
1N/Ause vars qw($t $y $x);
1N/A
1N/Aprint "1..7\n";
1N/A
1N/Aprint "not " if blessed(1);
1N/Aprint "ok 1\n";
1N/A
1N/Aprint "not " if blessed('A');
1N/Aprint "ok 2\n";
1N/A
1N/Aprint "not " if blessed({});
1N/Aprint "ok 3\n";
1N/A
1N/Aprint "not " if blessed([]);
1N/Aprint "ok 4\n";
1N/A
1N/A$y = \$t;
1N/A
1N/Aprint "not " if blessed($y);
1N/Aprint "ok 5\n";
1N/A
1N/A$x = bless [], "ABC";
1N/A
1N/Aprint "not " unless blessed($x);
1N/Aprint "ok 6\n";
1N/A
1N/Aprint "not " unless blessed($x) eq 'ABC';
1N/Aprint "ok 7\n";