in reply to Re: pl – Perl One-Liner Magic Wand: looking for feedback
in thread pl – Perl One-Liner Magic Wand: looking for feedback

The Makefile.PL should contain something like:

"EXE_FILES" => [ "bin/pl" ],

Where the pl file would actually be in bin directory within the distribution. There's no sense in App: distribution if the module just warns:This is a just dummy package for CPAN.  Please run the script 'pl' directly!.

Replies are listed 'Best First'.
Re^3: pl – Perl One-Liner Magic Wand: looking for feedback
by Daniel Pfeiffer (Acolyte) on Jun 16, 2022 at 09:33 UTC
    Thanks for the tip! It's fixed.
      Hello DanielPfeiffer,

      I'm mad for oneliners.. :) so I'd like to investigate this, but I have some test failed (strawberry perl portable)

      The only thing I find atm is a SO post where #!perl -W seems guilty and you have use warnings 'all'; in all your tests.

      HtH

      L*

      There are no rules, there are no thumbs..
      Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

        It's not the berries, because in the mean time cpantesters have reported success for 6 different Windows versions, all Strawberry.

        Something in yours is loading this non-standard variant of Config, where I don't even see why it would load Config at all. I have modified the failing test a bit: sub i tracks the modifications of %INC, using keydiff. Could you please run

        pl "$I = -1; sub i { ++$I; k $_, $INC{$_} for keys %INC } i; require Time::HiRes; i; for( @A, [$A[0], 123456] ) { E Isodate( $_, 0 ), I( 0.0, $_ ), I( $_, \"+0\" ), I( $_, 1 ), D( $_, -80, \"+90\", \"-9.5\" ), \"\"; Date \"08:45\", $_ } i" 123456789

        For me it records only a single change, the module I explicitly require. (Isodate would too, but I wanted to see it in isolation.) If you want more fun, what E would do for echoing refs, you can add this before the end quote: ; require Data::Dumper; i

        So much for maybe understanding. For the solution, I guess I'll have to drop my overzealous warnings (which I now realize, aren't complete anyway). Can you please remove '-W', from @cmd on line t/test.pm:51? Then please run perl t/unit.t

        Wow, they load a module that's not warning safe :~( I'd just switched to ActivePerl to get 5.36, which is fine. I guess I'll tweak it so that I distribute with lesser warnings than I test myself.
      Have you tested what happens when installing it with cpanm (or just cpan)? It's still not installing anything (I'm using a Mac).

        I'm sorry, I don't know how I can help you. I just installed cpanm 1.7044 as a Devuan package (Debian derived Linux) and it installs pl fine with -l /some/dir. (It does create various useless x86_64-linux-gnu-thread-multi subdirs, but that may be their problem and only cosmetic.) I can however confirm that reinstalling does overwrite the script – annoying but again not the end of the world.

        Maybe you can find a similarly minimal package as pl is, for you and me to compare? Cpanm is quite the opposite, having so many dependencies.

        Or you could open an issue against cpanm, saying that it works on Linux, but not Mac. If you add the output you get from cpanm -v App::pl, they'll probably know right away what's wrong. Or they might have access to a Mac, to find out…

        cpan on linux now works fine. Will have to check why cpanm does something different.