} @violations;
}
+=head1 CAVEATS
+
+The uses of the L<indirect> pragma inside the auditted code take precedence over this policy.
+Hence no violations will be reported for indirect method calls that are located inside the lexical scope of C<use indirect> or C<< no indirect hook => ... >>.
+Occurrences of C<no indirect> won't be a problem.
+
=head1 DEPENDENCIES
L<perl> 5.8, L<Carp>.
my ($tests, $reports, $subtests);
BEGIN {
- $tests = 25;
+ $tests = 27;
$reports = 42;
$subtests = 3;
}
----
[ 'new', 'X', 1, 9 ]
####
+use indirect; my $x = new X;
+----
+####
my $x = new X; $x = new X;
----
[ 'new', 'X', 1, 9 ], [ 'new', 'X', 1, 21 ]
[ 'new', 'new', 1, 9 ]
####
our $obj;
+use indirect; my $x = new $obj;
+----
+####
+our $obj;
my $x = new $obj;
----
[ 'new', '$obj', 2, 9 ]