in reply to Re^2: Perl syntax checking without `perl -c` [Syntax::Check]
in thread Perl syntax checking without `perl -c`
The issue seems to involve the "Module::Installed::Tiny dependency tree" — that doesn't look very Tiny to me.
Sheesh! I never noticed that. The deps are ALL related to test prereqs.
I liked the premise of the distribution, so I wrote my own. Module::Installed. It not only checks single modules, but I added a function that will list all includes in a file and whether or not they are installed or not. There are no non-core deps. PPI is required to use the includes_installed() function, but we load it dynamically only if it's available:
use warnings; use strict; use Data::Dumper; use Module::Installed qw(module_installed includes_installed); my $module = 'PPI'; my $file = '/home/spek/repos/module-installed/t/data/test.pl'; my $statement = module_installed($module) ? "is installed" : "isn't installed"; print "$module $statement\n\n"; print "Checking includes in file $file\n\n"; my $includes = includes_installed($file); print Dumper $includes;
Output:
PPI is installed Checking includes in file /home/spek/repos/module-installed/t/data/tes +t.pl $VAR1 = { 'Carp' => 1, 'Not::Installed' => 0, 'strict' => 1, 'warnings' => 1, 'Load::Fail' => 0, 'Exporter' => 1, 'Data::Dumper' => 1 };
I just finished a very large Perl project that I landed a little while ago. It's nice to be back in the Perl mindset, hammering out all manner of weird stuff. I'll take a look at the "bareword" issue in Syntax::Check later this afternoon.
Update: Holy crap, I just realized I've hit the 50 mark in published CPAN distributions!
|
---|