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