[Koha-devel] Proposal for a new coding guideline for command line scripts

Brendan Gallagher info at bywatersolutions.com
Wed Jul 25 00:34:07 CEST 2012


+1

Brendan

On Tue, Jul 24, 2012 at 1:09 PM, Chris Cormack <chris at bigballofwax.co.nz>wrote:

> +1
>
> Chris
> On Jul 25, 2012 4:02 AM, "Paul Poulain" <paul.poulain at biblibre.com> wrote:
>
>> Hello koha-devel,
>>
>> I just pushed a few minuts ago a new script in misc (bug 8376, but it
>> doesn't matter for this mail)
>>
>> This script has a help that is displayed when you run it with -h. So far
>> so good.
>>
>> BUT, it has no PODDOC. Not so good.
>>
>> I've discovered recently that we could use:
>> > use Pod::Usage;
>> >
>> > sub usage {
>> >     pod2usage( -verbose => 2 );
>> >     exit;
>> > }
>> > <snip>
>> > usage() if $help;
>>
>> That will deal with both POD and -h flag. It's used in some scripts like
>> misc/maintenance/touch_all_biblios.pl
>>
>> Do we agree it's a good idea to request that for future scripts, and add
>> this in the coding guidelines ?
>>
>> --
>> Paul POULAIN
>> http://www.biblibre.com
>> Expert en Logiciels Libres pour l'info-doc
>> Tel : (33) 4 91 81 35 08
>> _______________________________________________
>> Koha-devel mailing list
>> Koha-devel at lists.koha-community.org
>> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
>> website : http://www.koha-community.org/
>> git : http://git.koha-community.org/
>> bugs : http://bugs.koha-community.org/
>>
>
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
>



-- 
---------------------------------------------------------------------------------------------------------------
Brendan A. Gallagher
ByWater Solutions
CEO
Support and Consulting for Open Source Software
Installation, Data Migration, Training, Customization, Hosting
and Complete Support Packages
Headquarters: Santa Barbara, CA - Office: West Haven, CT
Phone # (888) 900-8944
http://bywatersolutions.com
info at bywatersolutions.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-devel/attachments/20120724/4b4695d5/attachment.htm>


More information about the Koha-devel mailing list