Dist::Zilla Disclaims

Well it is section end day here in the Dist-pen.

Today I am looking at the I think the last section plug-in the [WarrantyDisclaimer] plug-in. This is your standard blurb type plug-in that will dump a bunch of legal words that is suppose to cover your arse if someone uses you code to control a self-driving car that goes berserk and crashes into a children's hospital causing a fire as the cute puppy store.

This plug-in has a number of subclasses that you can use to match up the license you are using to the correct subclass. So far there are six sub-clases

  • Default
  • Artistic
  • Custom
  • GPL1
  • GPL2
  • GPL3

Myself as I am using the GPL 3 so in my 'weaver.ini' file all I need to add in is


[Test::Legal]
++[WarrantyDisclaimer::GPL3]
[Test::NoTabs]

and after I install in parent class 'Pod::Weaver::Section::WarrantyDisclaimer ' and then a clean and build I get;


=head1 DISCLAIMER OF WARRANTY

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
 
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

So that worked fine. The plug-in accomplishes this by each class overwriting the 'warranty_section_title' sub and the 'warranty_text' sub.

If you want some sort of custom text use the 'Custom' plug-in which provides the 'title' and 'text' attributes which lets you change either to what ever you want to stick in.

So that is the post-ette for tonight, Now I have to find something else to write about.

godzilla_war_of_the_monsters___disclaimer_by_cwpetesch-dbygr67.jpg

Leave a comment

About byterock

user-pic Long time Perl guy, a few CPAN mods allot of work on DBD::Oracle and a few YAPC presentations