my $id; # now $id exists! $id = F::D->new( foo => sub { 'here, $id exists too' } );