use strict;
use warnings;

our $value = 3;
our $alias;
*alias = \$value;

sub read_alias {
    local $value = 9;
    return $alias + $value;
}

die "bad typeglob/local" unless read_alias() == 12;
1;

=pod

=head1 NAME

t/fixtures/nasty_typeglob_local.pl - fixture for fixture that stresses local typeglob manipulation

=head1 DESCRIPTION

This fixture exists to provide fixture that stresses local typeglob manipulation. Tests load or execute it to reproduce a
specific code shape that the PAX compiler, capture engine, or runtime must
handle correctly.

=head1 HOW TO USE

Keep the fixture small and focused on the behavior named above. When a new test
needs a different shape, add or change fixtures deliberately instead of turning
this file into a grab bag.

=cut
