Cross Reference: blessed.t
xref
: /
osnet-11
/
usr
/
src
/
cmd
/
perl
/
5.8.4
/
distrib
/
ext
/
List
/
Util
/
t
/
blessed.t
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
blessed.t revision 1
1
N/A
#!./perl
1
N/A
1
N/A
BEGIN
{
1
N/A
unless
(-d
'blib'
)
{
1
N/A
chdir
't'
if
-d
't'
;
1
N/A
@
INC
=
'../lib'
;
1
N/A
require
Config
;
import
Config
;
1
N/A
keys
%
Config
;
# Silence warning
1
N/A
if
(
$Config
{
extensions
} !~ /\
bList
\/
Util
\b/)
{
1
N/A
print
"1..0 # Skip: List::Util was not built\n"
;
1
N/A
exit
0
;
1
N/A
}
1
N/A
}
1
N/A
}
1
N/A
1
N/A
use
Scalar
::
Util
qw
(
blessed
)
;
1
N/A
use
vars
qw
($t $y $x)
;
1
N/A
1
N/A
print
"1..7\n"
;
1
N/A
1
N/A
print
"not "
if
blessed
(
1
)
;
1
N/A
print
"ok 1\n"
;
1
N/A
1
N/A
print
"not "
if
blessed
(
'A'
)
;
1
N/A
print
"ok 2\n"
;
1
N/A
1
N/A
print
"not "
if
blessed
({})
;
1
N/A
print
"ok 3\n"
;
1
N/A
1
N/A
print
"not "
if
blessed
([])
;
1
N/A
print
"ok 4\n"
;
1
N/A
1
N/A
$y = \$t;
1
N/A
1
N/A
print
"not "
if
blessed
($y)
;
1
N/A
print
"ok 5\n"
;
1
N/A
1
N/A
$x =
bless
[],
"ABC"
;
1
N/A
1
N/A
print
"not "
unless
blessed
($x)
;
1
N/A
print
"ok 6\n"
;
1
N/A
1
N/A
print
"not "
unless
blessed
($x)
eq
'ABC'
;
1
N/A
print
"ok 7\n"
;