]> git.vpit.fr Git - perl/modules/indirect.git/blobdiff - lib/indirect.pm
Bump copyright year
[perl/modules/indirect.git] / lib / indirect.pm
index 763bf95df0f6e90005ea5df084407dd803fd9f27..eab58dd74d8730ecbfbb544e9dac0583f2c8cc30 100644 (file)
@@ -11,13 +11,13 @@ indirect - Lexically warn about using the indirect method call syntax.
 
 =head1 VERSION
 
-Version 0.31
+Version 0.38
 
 =cut
 
 our $VERSION;
 BEGIN {
- $VERSION = '0.31';
+ $VERSION = '0.38';
 }
 
 =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>.
@@ -253,6 +253,26 @@ This is due to a shortcoming in the way perl handles the hints hash, which is ad
 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.
@@ -279,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.
@@ -289,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 Vincent Pit, all rights reserved.
+Copyright 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017 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.