package example;
use v5.10;
use warnings;
use strict 'subs';
use feature 'state';
require Exporter;
our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
@ISA = qw(Exporter);
$::debug=1;
{
our $debug;
say "debug=$debug";
}
$VERSION = '1.10';
1;
and the test script:
#!/usr/bin/perl
#:: test of ours
use v5.10;
use warnings;
use strict 'subs';
use feature 'state';
use lib '.';
use example;
say "debug=$debug";
####
[255] # perl test_our_behaviour.pl
[0] # perl test_our_behaviour.pl
Use of uninitialized value $example::debug in concatenation (.) or string at example.pm line 14.
IN EXAMPLE: debug=
debug=1