diff options
author | Mark Murray <markm@FreeBSD.org> | 2002-03-16 20:14:31 +0000 |
---|---|---|
committer | Mark Murray <markm@FreeBSD.org> | 2002-03-16 20:14:31 +0000 |
commit | cf90a21ebd2262e09730a5a55c5ccb62f1622fad (patch) | |
tree | 116739180f0198b4d3857979a8e84444c2fe0949 /contrib/perl5/t/op/my_stash.t | |
parent | fc75d0664419eb8c8f264d8f298df2cd155c8966 (diff) |
Notes
Diffstat (limited to 'contrib/perl5/t/op/my_stash.t')
-rwxr-xr-x | contrib/perl5/t/op/my_stash.t | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/perl5/t/op/my_stash.t b/contrib/perl5/t/op/my_stash.t new file mode 100755 index 000000000000..4a1d5022e023 --- /dev/null +++ b/contrib/perl5/t/op/my_stash.t @@ -0,0 +1,31 @@ +#!./perl + +package Foo; + +BEGIN { + @INC = '../lib'; +} + +use Test; + +plan tests => 7; + +use constant MyClass => 'Foo::Bar::Biz::Baz'; + +{ + package Foo::Bar::Biz::Baz; +} + +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 $@; +} |