diff options
author | markm <markm@FreeBSD.org> | 2002-03-16 20:14:31 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2002-03-16 20:14:31 +0000 |
commit | df2204f4cdf3fa64a0b2d36a33a3094944c9c4ab (patch) | |
tree | 1a8c861937509eca308e49c4f8940a22a169caf0 /contrib/perl5/t/op/my_stash.t | |
parent | b878a8b4fc512ca76116a7012802d385208857c3 (diff) | |
parent | e624907b04b90475ab8fb7b93c15320db1969c09 (diff) | |
download | FreeBSD-src-df2204f4cdf3fa64a0b2d36a33a3094944c9c4ab.zip FreeBSD-src-df2204f4cdf3fa64a0b2d36a33a3094944c9c4ab.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r92444,
which included commits to RCS files with non-trunk default branches.
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 0000000..4a1d502 --- /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 $@; +} |