Cross Reference: my_stash.t
xref
: /
osnet-11
/
usr
/
src
/
cmd
/
perl
/
5.8.4
/
distrib
/
t
/
op
/
my_stash.t
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
#!./perl
package
Foo
;
BEGIN
{
chdir
't'
if
-d
't'
;
@
INC
=
'../lib'
;
}
use
Test
;
plan
tests
=>
7
;
use
constant
MyClass
=>
'Foo::Bar::Biz::Baz'
;
{
package
Foo
::
Bar
::
Biz
::
Baz
;
1
;
}
for
(
qw
(
Foo
Foo
::
MyClass
__PACKAGE__
)
)
{
eval
"sub { my $_ \$obj = shift; }"
;
ok
! $@;
# print $@ if $@;
}
use
constant
NoClass
=>
'Nope::Foo::Bar::Biz::Baz'
;
for
(
qw
(
Nope
Nope
::
NoClass
)
)
{
eval
"sub { my $_ \$obj = shift; }"
;
ok
$@;
# print $@ if $@;
}