]> git.vpit.fr Git - perl/modules/indirect.git/blobdiff - lib/indirect.pm
Bump copyright year
[perl/modules/indirect.git] / lib / indirect.pm
index 1d4292273174ccee815af54fcf37e0e837a3aa39..fd488e78c91a093159e9346d389fa5c9872f8f98 100644 (file)
@@ -11,13 +11,13 @@ indirect - Lexically warn about using the indirect method call syntax.
 
 =head1 VERSION
 
-Version 0.33
+Version 0.36
 
 =cut
 
 our $VERSION;
 BEGIN {
- $VERSION = '0.33';
+ $VERSION = '0.36';
 }
 
 =head1 SYNOPSIS
@@ -56,7 +56,7 @@ Global uses :
 When enabled, this pragma warns about indirect method calls that are present in your code.
 
 The indirect syntax is now considered harmful, since its parsing has many quirks and its use is error prone : when the subroutine C<foo> has not been declared in the current package, C<foo $x> actually compiles to C<< $x->foo >>, and C<< foo { key => 1 } >> to C<< 'key'->foo(1) >>.
-In L<http://www.shadowcat.co.uk/blog/matt-s-trout/indirect-but-still-fatal>, Matt S. Trout gives an example of an undesirable indirect method call on a block that can cause a particularly bewildering error.
+Please refer to the L</REFERENCES> section for a more complete list of reasons for avoiding this construct.
 
 This pragma currently does not warn for core functions (C<print>, C<say>, C<exec> or C<system>).
 This may change in the future, or may be added as optional features that would be enabled by passing options to C<unimport>.
@@ -250,11 +250,29 @@ If you use C<perl> 5.12 or greater, those constructs are correctly reported.
 With 5.8 perls, the pragma does not propagate into C<eval STRING>.
 This is due to a shortcoming in the way perl handles the hints hash, which is addressed in perl 5.10.
 
-Indirect constructs that appear in code C<eval>'d during the global destruction phase of a spawned thread or pseudo-fork (the processes used internally for the C<fork> emulation on Windows) are not reported.
-
 The search for indirect method calls happens before constant folding.
 Hence C<my $x = new Class if 0> will be caught.
 
+=head1 REFERENCES
+
+Numerous articles have been written about the quirks of the indirect object construct :
+
+=over 4
+
+=item *
+
+L<http://markmail.org/message/o7d5sxnydya7bwvv> : B<Far More Than Everything You've Ever Wanted to Know about the Indirect Object syntax>, Tom Christiansen, 1998-01-28.
+
+This historical post to the C<perl5-porters> mailing list raised awareness about the perils of this syntax.
+
+=item *
+
+L<http://www.shadowcat.co.uk/blog/matt-s-trout/indirect-but-still-fatal> : B<Indirect but still fatal>, Matt S. Trout, 2009-07-29.
+
+In this blog post, the author gives an example of an undesirable indirect method call on a block that causes a particularly bewildering error.
+
+=back
+
 =head1 DEPENDENCIES
 
 L<perl> 5.8.1.
@@ -281,8 +299,6 @@ You can find documentation for this module with the perldoc command.
 
     perldoc indirect
 
-Tests code coverage report is available at L<http://www.profvince.com/perl/cover/indirect>.
-
 =head1 ACKNOWLEDGEMENTS
 
 Bram, for motivation and advices.
@@ -291,7 +307,7 @@ Andrew Main and Florian Ragwitz, for testing on real-life code and reporting iss
 
 =head1 COPYRIGHT & LICENSE
 
-Copyright 2008,2009,2010,2011,2012,2013,2014,2015 Vincent Pit, all rights reserved.
+Copyright 2008,2009,2010,2011,2012,2013,2014,2015,2016 Vincent Pit, all rights reserved.
 
 This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.