X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Findirect.git;a=blobdiff_plain;f=README;h=f2153cfdb5f0557d0530f6686f11d1f35f9c9ffa;hp=6088d3085ac097a307c7a0be19c4fc09a77dab90;hb=4d65569df65cefa65e190d1659c82c1b7fe51058;hpb=bdc119d5364c7dd16c2cfd0b2627bd50cca592f0 diff --git a/README b/README index 6088d30..f2153cf 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ NAME indirect - Lexically warn about using the indirect method call syntax. VERSION - Version 0.33 + Version 0.34 SYNOPSIS In a script : @@ -41,10 +41,9 @@ DESCRIPTION The indirect syntax is now considered harmful, since its parsing has many quirks and its use is error prone : when the subroutine "foo" has not been declared in the current package, "foo $x" actually compiles to - "$x->foo", and "foo { key => 1 }" to "'key'->foo(1)". In - , - Matt S. Trout gives an example of an undesirable indirect method call on - a block that can cause a particularly bewildering error. + "$x->foo", and "foo { key => 1 }" to "'key'->foo(1)". Please refer to + the "REFERENCES" section for a more complete list of reasons for + avoiding this construct. This pragma currently does not warn for core functions ("print", "say", "exec" or "system"). This may change in the future, or may be added as @@ -177,6 +176,24 @@ CAVEATS The search for indirect method calls happens before constant folding. Hence "my $x = new Class if 0" will be caught. +REFERENCES + Numerous articles have been written about the quirks of the indirect + object construct : + + * : 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 "perl5-porters" mailing list raised + awareness about the perils of this syntax. + + * : 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. + DEPENDENCIES perl 5.8.1. @@ -212,8 +229,8 @@ ACKNOWLEDGEMENTS reporting issues. COPYRIGHT & LICENSE - Copyright 2008,2009,2010,2011,2012,2013,2014 Vincent Pit, all rights - reserved. + Copyright 2008,2009,2010,2011,2012,2013,2014,2015 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.