Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

perl::critic::policy::objects::prohibitindirectsyntax(3pm) [debian man page]

Perl::Critic::Policy::Objects::ProhibitIndirectSyntax(3pUser Contributed Perl DocumentatPerl::Critic::Policy::Objects::ProhibitIndirectSyntax(3pm)

NAME
Perl::Critic::Policy::Objects::ProhibitIndirectSyntax - Prohibit indirect object call syntax. AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Indirect object syntax is commonly used in other object-oriented languages for instantiating objects. Perl allows this, but to say that it supports it may be going too far. Instead of writing my $foo = new Foo; it is preferable to write my $foo = Foo->new; The problem is that Perl needs to make a number of assumptions at compile time to disambiguate the first form, so it tends to be fragile and to produce hard-to-track-down bugs. CONFIGURATION
Indirect object syntax is also hard for Perl::Critic to disambiguate, so this policy only checks certain subroutine calls. The names of the subroutines can be configured using the "forbid" configuration option: [Objects::ProhibitIndirectSyntax] forbid = create destroy The "new" subroutine is configured by default; any additional "forbid" values are in addition to "new". CAVEATS
The general situation can not be handled via static analysis. SEE ALSO
Perl::Critic::Policy::Dynamic::NoIndirect and indirect both do a better job with this, but they require that you compile/execute your code. AUTHOR
Thomas R. Wyant, III wyant at cpan dot org COPYRIGHT
Copyright (c) 2009-2011 Tom Wyant. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. perl v5.14.2 2012-06-07 Perl::Critic::Policy::Objects::ProhibitIndirectSyntax(3pm)

Check Out this Related Man Page

Perl::Critic::Policy::ControlStructures::ProhibitUntilBlUser(Contributed Perl DocPerl::Critic::Policy::ControlStructures::ProhibitUntilBlocks(3pm)

NAME
Perl::Critic::Policy::ControlStructures::ProhibitUntilBlocks - Write "while(! $condition)" instead of "until($condition)". AFFILIATION
This Policy is part of the core Perl::Critic distribution. DESCRIPTION
Conway discourages using "until" because it leads to double-negatives that are hard to understand. Instead, reverse the logic and use "while". until($condition) { do_something() } #not ok until(! $no_flag) { do_something() } #really bad while( ! $condition) { do_something() } #ok This Policy only covers the block-form of "until". For the postfix variety, see "ProhibitPostfixControls". CONFIGURATION
This Policy is not configurable except for the standard options. SEE ALSO
Perl::Critic::Policy::ControlStructures::ProhibitPostfixControls AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. perl v5.14.2 2012-06-07 Perl::Critic::Policy::ControlStructures::ProhibitUntilBlocks(3pm)
Man Page

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Best place on the net to get Perl tutorials ?

I am looking for a full Perl course on internet (tutorial) to learn everything about Perl. I already know a bunch of programing languages. I have started Unix interests this year ever since I installed Ubuntu Linux on my PC AND I also got a job at IBM doing software distributions with... (1 Reply)
Discussion started by: Browser_ice
1 Replies

2. Programming

Creation and Accessing Shared Objects (.so)

Hi, I am looking for references about creating and accessing Shared Objects (.so) through C/C++ on Unix / Linux platforms. Is it possible and where can I find the info. Thanks Phil (1 Reply)
Discussion started by: phil nascimento
1 Replies

3. UNIX for Advanced & Expert Users

Static code analysis for Perl

As an addition to our ongoing investigation into static code analysis tools for a Perl programming we are maintaining, can anyone recommend a certain tool that he/she is experienced with? We are already actively using perl::critic (Perl::Critic) and rats... (2 Replies)
Discussion started by: figaro
2 Replies