More memory lane.
[p5sagit/p5-mst-13.2.git] / t / op / my_stash.t
CommitLineData
def3634b 1#!./perl
2
3package Foo;
4
036b4402 5BEGIN {
88587957 6 chdir 't' if -d 't';
20822f61 7 @INC = '../lib';
036b4402 8}
9
def3634b 10use Test;
11
12plan tests => 7;
13
14use constant MyClass => 'Foo::Bar::Biz::Baz';
15
16{
17 package Foo::Bar::Biz::Baz;
0a0ab32c 18 1;
def3634b 19}
20
21for (qw(Foo Foo:: MyClass __PACKAGE__)) {
22 eval "sub { my $_ \$obj = shift; }";
23 ok ! $@;
24# print $@ if $@;
25}
26
27use constant NoClass => 'Nope::Foo::Bar::Biz::Baz';
28
29for (qw(Nope Nope:: NoClass)) {
30 eval "sub { my $_ \$obj = shift; }";
31 ok $@;
32# print $@ if $@;
33}