Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

LICENCE file

by Bod (Parson)
on Oct 15, 2023 at 20:42 UTC ( [id://11154966] : perlquestion . print w/replies, xml ) Need Help??

Bod has asked for the wisdom of the Perl Monks concerning the following question:

I've added a LICENCE file following advice from SankoR in Re: GitHub perl-ci.yml

I have used App::Software::License as suggested in this Perl blog

However, both the blog and the module are quite old. Plus, the blog comment suggests this might not be the best methodology...

Is there a 'better' method that Monks are using?

As an aside, for the benefit of anyone stumbling this way looking at using App::Software::License. The documentation is wrong - at least for Strawberry Perl on Windows. The documentation shows single quotes for the --holder attribute. If single quotes are used, just the firstname is shown in the LICENCE file. Using double quotes solves this problem: --holder "Joe Bloggs"

Replies are listed 'Best First'.
Re: LICENCE file
by soonix (Canon) on Oct 16, 2023 at 08:31 UTC
    The documentation is wrong - at least for Strawberry Perl on Windows. The documentation shows single quotes for the --holder attribute. If single quotes are used, just the firstname is shown in the LICENCE file. Using double quotes solves this problem: --holder "Joe Bloggs"
    This is a general problem with command-line arguments, there's regular discussions, e.g. related to perl -e oneliners. Unix/Linux single quote, Windows native double quote (probably same with ActivePerl, while Cygwin (and MinGW) Shell is a bash which understands quotes the same as Unix/Linux.

      Yes. I've noticed most documentation in the Perl world tends to assume Unix shell quoting ... so I've gotten used to translating to Windows CMD quoting when running under Windows. It's got more complicated in recent years with Microsoft exhorting you to prefer PowerShell to CMD.

      Bod, which command shell do you use on Windows: COMMAND.COM or CMD.EXE or PowerShell or something else? The single quotes should work with PowerShell (and Cygwin).

      To illustrate the differences, I ran this trivial Perl program print-args.pl on Ubuntu bash, Windows CMD, and Windows PowerShell:

      use strict; use warnings; for my $arg (@ARGV) { print "arg=:$arg:\n"; }

      Ubuntu bash:

      $ perl print-args.pl 'Hello Bod' arg=:Hello Bod:

      Windows CMD:

      C:\Bod> perl print-args.pl 'Hello Bod' arg=:'Hello: arg=:Bod':

      Windows PowerShell:

      PS C:\Bod> perl print-args.pl 'Hello Bod' arg=:Hello Bod:

      See also: Comparison of command shells

      Updated: added Cygwin reference

        G'day 👁️🍾👍🦟,

        Just to complete your examples; Cygwin works the same as Ubuntu (probably any flavour of Linux) and PowerShell.

        $ perl -v | head -2 | tail -1 This is perl 5, version 38, subversion 0 (v5.38.0) built for cygwin-th +read-multi $ alias perle alias perle='perl -Mstrict -Mwarnings -Mautodie=:all -MCarp::Always -E +' $ perle 'say "arg=:$_:" for @ARGV' 'Hello Bod' arg=:Hello Bod: $ cat print-args.pl use strict; use warnings; for my $arg (@ARGV) { print "arg=:$arg:\n"; } $ perl print-args.pl 'Hello Bod' arg=:Hello Bod:

        Fun update:

        In the greeting, I originally used "👁🍾🦟" (for eyepopslikeamosquito) which (I believe) you first used in "Re^8: Extracting DNC issues (LOLFOFLRATGSEAUSU)".

        As those elements really only give "eyepopsamosquito", I've taken the liberty of adding 👍🏻 for "like"; I also upgraded the eye from its text form (👁) to its emoji form (👁️).
        This gives: 👁️🍾👍🏻🦟

        I'm fairly certain hippo was the first to use just emoji for his signature; i.e. 🦛. Perhaps you, not currently having a signature, would like to be the second, with 👁️🍾👍🏻🦟.

        Fun update the Second: Changed 👁️🍾👍🏻🦟 to 👁️🍾👍🦟 in greeting as per stated preferences.

        — Ken

        which command shell do you use on Windows

        Mostly cmd...

      This is a general problem with command-line arguments, there's regular discussions, e.g. related to perl -e oneliners

      Oh! How strange that I didn't connect this to the issues I have with quoting one-liners...

Re: LICENCE file [aka LICENSE]
by kcott (Archbishop) on Oct 16, 2023 at 14:51 UTC
Re: LICENCE file
by bliako (Monsignor) on Oct 16, 2023 at 23:33 UTC
    The documentation is wrong - at least for Strawberry Perl on Windows. +The documentation shows single quotes for the --holder attribute. If +single quotes are used, just the firstname is shown in the LICENCE fi +le. Using double quotes solves this problem: --holder "Joe Bloggs"

    This space is intentionally left blank by a Unix-Exclusive User who does not want to pester Perl Monks with repeated ranting.

    bw, bliako