2 indirect - Lexically warn about using the indirect object syntax.
9 my $x = new Apple 1, 2, 3; # warns
12 my $y = new Pear; # ok
15 if (defied $foo) { ... } # croaks, note the typo
18 When enabled (or disabled as some may prefer, since you actually turn it
19 on by calling "no indirect"), this pragma warns about indirect object
20 syntax constructs that may have slipped into your code. This syntax is
21 now considered harmful, since its parsing has many quirks and its use is
22 error prone (when "sub" isn't defined, "sub $x" is actually interpreted
25 It currently does not warn when the object is enclosed between braces
26 (like "meth { $obj } @args") or for core functions ("print" or "say").
27 This may change in the future, or may be added as optional features that
28 would be enabled by passing options to "unimport".
32 Magically called when "no indirect @args" is encountered. Turns the
33 module on. If @opts contains ':fatal', the module will croak on the
34 first indirect syntax met.
37 Magically called at each "use indirect". Turns the module off.
42 XSLoader (standard since perl 5.006).
45 Vincent Pit, "<perl at profvince.com>", <http://www.profvince.com>.
47 You can contact me by mail or on #perl @ FreeNode (vincent or
51 Please report any bugs or feature requests to "bug-indirect at
52 rt.cpan.org", or through the web interface at
53 <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=indirect>. I will be
54 notified, and then you'll automatically be notified of progress on your
55 bug as I make changes.
58 You can find documentation for this module with the perldoc command.
62 Tests code coverage report is available at
63 <http://www.profvince.com/perl/cover/indirect>.
66 Bram, for motivation and advices.
69 Copyright 2008 Vincent Pit, all rights reserved.
71 This program is free software; you can redistribute it and/or modify it
72 under the same terms as Perl itself.