This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
B::walksymtable improperly documented?
[perl5.git] / t / op / my_stash.t
1 #!./perl
2
3 package Foo;
4
5 BEGIN {
6     @INC = '../lib';
7 }
8
9 use Test;
10
11 plan tests => 7;
12
13 use constant MyClass => 'Foo::Bar::Biz::Baz';
14
15 {
16     package Foo::Bar::Biz::Baz;
17 }
18
19 for (qw(Foo Foo:: MyClass __PACKAGE__)) {
20     eval "sub { my $_ \$obj = shift; }";
21     ok ! $@;
22 #    print $@ if $@;
23 }
24
25 use constant NoClass => 'Nope::Foo::Bar::Biz::Baz';
26
27 for (qw(Nope Nope:: NoClass)) {
28     eval "sub { my $_ \$obj = shift; }";
29     ok $@;
30 #    print $@ if $@;
31 }