From: Vincent Pit Date: Tue, 31 Mar 2015 20:38:48 +0000 (-0300) Subject: Also point to tomc's FMTEYEWTK post in POD X-Git-Tag: rt100068^0 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=commitdiff_plain;h=bdc119d5364c7dd16c2cfd0b2627bd50cca592f0 Also point to tomc's FMTEYEWTK post in POD This fixes RT #100068. --- diff --git a/lib/indirect.pm b/lib/indirect.pm index 1d42922..fc4708f 100644 --- a/lib/indirect.pm +++ b/lib/indirect.pm @@ -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 has not been declared in the current package, C actually compiles to C<< $x->foo >>, and C<< foo { key => 1 } >> to C<< 'key'->foo(1) >>. -In L, 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 section for a more complete list of reasons for avoiding this construct. This pragma currently does not warn for core functions (C, C, C or C). This may change in the future, or may be added as optional features that would be enabled by passing options to C. @@ -255,6 +255,26 @@ Indirect constructs that appear in code C'd during the global destruction The search for indirect method calls happens before constant folding. Hence C will be caught. +=head1 REFERENCES + +Numerous articles have been written about the quirks of the indirect object construct : + +=over 4 + +=item * + +L : B, Tom Christiansen, 1998-01-28. + +This historical post to the C mailing list raised awareness about the perils of this syntax. + +=item * + +L : B, 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 5.8.1.