]> git.vpit.fr Git - perl/modules/indirect.git/blobdiff - lib/indirect.pm
Also point to tomc's FMTEYEWTK post in POD
[perl/modules/indirect.git] / lib / indirect.pm
index 1d4292273174ccee815af54fcf37e0e837a3aa39..fc4708f8db1442f89d8f034f0bbfe36f95362f3e 100644 (file)
@@ -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>.
@@ -255,6 +255,26 @@ Indirect constructs that appear in code C<eval>'d during the global destruction
 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.