Perl::Critic - Automatically review your code
perltraining.com.au
perltraining.com.au
The thing about these tools (along with other checkers, warnings, errors, etc), for me at least, is they tend to be corrective. I learn not to keep making the same mistakes, if for no other reason that to avoid the "pain". This is just icing on top of the fact that these tools can be automated, especially to prevent code from being checked in or merged when it violates these checking systems.
generally speaking, i find the centralized packaging system flawed ... because on the long term its unsustainable
cpan is decentralized by the way, because module makers package their modules themselves for cpan
Also I assume that cpan packages reflected through apt will be updated with apt-get update, while cpan has no similar update-all mechanism (AFAIK).
One advantage of using cpan is that if you're developing on a Mac and deploying on a Debian distro you can use the same commands on both systems to pull in the packages you need.
and the command line interface, you have cpan, cpanp (cpan plus) and cpanm (cpan minus)
some cpan interfaces work better than others
cpan upgrade /(.*)/
First, typing that in the shell gives me an error:
zsh: no matches found: /(.*)/
So, I tried typing: cpan upgrade '/(.*)/'
Which at least kept my shell from trying to expand the last argument, but cpan complained: Warning: Cannot install upgrade, don't know what it is.
Try the command
i /upgrade/
to find objects with matching identifiers.
Sorry, install with a regular expression is only supported when unambiguous.
Rejecting argument '/(.*)/'
So, instead at the shell I just typed: cpan
Then, at the cpan[1]> prompt, I typed: upgrade
That seemed to work.I also use cpanm when I have a need to be separate from vendor, but generally in the worst-case admins prefer to only maintain one set of perl/cpan rather than two.
Could you elaborate on why you think this?
linux and foss rely on volunteer effort, therefore efficiency matters a lot, inefficient system will loose volunteers and momentum, i think its surprising the system lasted for so long , but then i believe the number of surviving distros is in decline and even less so the number of package management system
anyway, maybe my usage of the word centralized and decentralized term is wrong
cpan can be viewed as centralized, it is a single storage space for all modules
i just believe that is too much waste, in having to repackage each application to different systems, there must be a better way, where the effort will be more efficient and require less resources
maybe the opposite of what i said is true, maybe we need to centralize over one package system to reduce the effort, or in other, maybe we need we centralized over a single system and repo, to be able to decentralize the effort
And you want multiple Perls installed, anyway. Backward compatibility is a target in the Perl world, but stay safe... ("This is the versions at the job servers. This is what I do my hobbies with. Also, I need to keep a 5.8.8 Perl, to make certain so X works with that golden oldie.")
It is quite limited by Perl's quirky syntax, unfortunately ("only Perl can parse Perl"). Last time I checked, it would miss e.g. all warnings for anonymous subs:
# triggers "Subroutine "foo" does not end with "return" at line 5, column 1. See page 197 of PBP. (Severity: 4)"
sub foo {
my $s=shift;
}
# triggers no warnings
my $x = sub {
my $s=shift;
}
This is a bug/limitation in PPI (which otherwise does a great job with the mess that is Perl syntax) ... I'd assume the various JS analysers can do a more thorough job.https://developers.google.com/closure/utilities/
(disclaimer: I helped write this when I was working there)
(I submit these slides in support of the previous rhetorical question: http://www.oualline.com/talks/perl.pdf)