in reply to Re: Perl syntax checking without `perl -c`
in thread Perl syntax checking without `perl -c`

I had a look in both the POD and the source: couldn't see anything that dealt with "Can't use bareword ("syntactic_sugar") ..." which I first mentioned in "Re: Perl syntax checking without `perl -c` [general reply to all]".

I checked and found that I did have PPI so I thought I'd install it. More than 45 minutes later, and it's still installing (I have neither a slow machine nor a slow internet connection). The issue seems to involve the "Module::Installed::Tiny dependency tree" — that doesn't look very Tiny to me.

I have to go back to $work now. The installation is still running. I can't wait for it any longer.

Update: I checked back periodically. It looks like the installation hung after about 1hr 10mins.

— Ken

Replies are listed 'Best First'.
Re^3: Perl syntax checking without `perl -c` [Syntax::Check]
by stevieb (Canon) on Dec 07, 2020 at 18:51 UTC
    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!