package ExtUtils::ModuleMaker::Licenses::Standard;
use strict;
BEGIN {
use Exporter ();
use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
$VERSION = 0.32;
@ISA = qw (Exporter);
#Give a hoot don't pollute, do not export more than needed by default
@EXPORT = qw (&Get_Standard_License &Verify_Standard_License);
@EXPORT_OK = qw ();
%EXPORT_TAGS = ();
}
########################################### main pod documentation begin ##
# Below is the stub of documentation for your module. You better edit it!
=head1 NAME
ExtUtils::ModuleMaker::Licenses::Standard - Templates for the module's License/Copyright
=head1 SYNOPSIS
use ExtUtils::ModuleMaker::Licenses::Standard;
blah blah blah
=head1 DESCRIPTION
This module holds the licence and copyright information for use by ExtUtils::ModuleMaker.
If you want to add a local license it should not be done here but in the module
ExtUtils::ModuleMaker::Licenses::Local.
=head1 USAGE
=head1 BUGS
=head1 SUPPORT
=head1 AUTHOR
R. Geoffrey Avery
CPAN ID: RGEOFFREY
modulemaker@PlatypiVentures.com
http://www.PlatypiVentures.com/perl/modules/ModuleMaker.shtml
=head1 COPYRIGHT
Copyright (c) 2002 R. Geoffrey Avery. All rights reserved.
This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the
LICENSE file included with this module.
=head1 SEE ALSO
perl(1).
=head1 PUBLIC METHODS
Each public function/method is described here.
These are how you should interact with this module.
=cut
############################################# main pod documentation end ##
my %licenses =
(
perl => { function => \&License_Perl,
fullname =>'Same terms as Perl itself',
},
apache => { function => \&License_Apache_1_1,
fullname => ''
},
apache_1_1 => { function => \&License_Apache_1_1,
fullname => 'Apache Software License (1.1)'
},
artistic => { function => \&License_Artistic,
fullname => 'Artistic License'
},
artisticA => { function => \&License_Artistic_w_Aggregation,
fullname => 'Artistic License w/ Aggregation'
},
r_bsd => { function => \&License_r_BSD,
fullname => 'BSD License(Raw)'
},
bsd => { function => \&License_BSD,
fullname => 'BSD License'
},
gpl => { function => \&License_GPL_2,
fullname => ''
},
gpl_2 => { function => \&License_GPL_2,
fullname => 'GPL - General Public License (2)'
},
ibm => { function => \&License_IBM_1_0,
fullname => ''
},
ibm_1_0 => { function => \&License_IBM_1_0,
fullname => 'IBM Public License Version (1.0)'
},
intel => { function => \&License_Intel,
fullname => 'Intel (BSD+)'
},
jabber => { function => \&License_Jabber_1_0,
fullname => ''
},
jabber_1_0 => { function => \&License_Jabber_1_0,
fullname => 'Jabber (1.0)'
},
lgpl => { function => \&License_LGPL_2_1,
fullname => ''
},
lgpl_2_1 => { function => \&License_LGPL_2_1,
fullname => 'LGPL - GNU Lesser General Public License (2.1)'
},
mit => { function => \&License_MIT,
fullname => 'MIT License'
},
mitre => { function => \&License_MITRE,
fullname => 'CVW - MITRE Collaborative Virtual Workspace'
},#mitre includes gpl 2.0 and mozilla 1.0
mozilla => { function => \&License_Mozilla_1_1,
fullname => ''
},
mozilla_1_1 => { function => \&License_Mozilla_1_1,
fullname => 'Mozilla Public License (1.1)'
},
mozilla_1_0 => { function => \&License_Mozilla_1_0,
fullname => 'Mozilla Public License (1.0)'
},
mpl => { function => \&License_Mozilla_1_1,
fullname => ''
},
mpl_1_1 => { function => \&License_Mozilla_1_1,
fullname => ''
},
mpl_1_0 => { function => \&License_Mozilla_1_0,
fullname => ''
},
nethack => { function => \&License_Nethack,
fullname => 'Nethack General Public License'
},
nokia => { function => \&License_Nokia_1_0a,
fullname => ''
},
nokos => { function => \&License_Nokia_1_0a,
fullname => ''
},
nokia_1_0a => { function => \&License_Nokia_1_0a,
fullname => 'Nokia Open Source License(1.0a)'
},
nokos_1_0a => { function => \&License_Nokia_1_0a,
fullname => ''
},
python => { function => \&License_Python,
fullname => 'Python License'
},
q => { function => \&License_Q_1_0,
fullname => ''
},
q_1_0 => { function => \&License_Q_1_0,
fullname => 'Q Public License (1.0)'
},
ricoh => { function => \&License_Ricoh_1_0,
fullname => ''
},
ricoh_1_0 => { function => \&License_Ricoh_1_0,
fullname => 'Ricoh Source Code Public License (1.0)'
},
sun => { function => \&License_Sun,
fullname => ''
},
sissl => { function => \&License_Sun,
fullname => 'Sun Internet Standards Source License'
},
sleepycat => { function => \&License_Sleepycat,
fullname => 'The Sleepycat License'
},
vovida => { function => \&License_Vovida_1_0,
fullname => ''
},
vovida_1_0 => { function => \&License_Vovida_1_0,
fullname => 'Vovida Software License (1.0)'
},
zlib => { function => \&License_ZLIB,
fullname => 'zlib/libpng License'
},
libpng => { function => \&License_ZLIB,
fullname => ''
},
#not yet installed
# python_2_1_1 => { function => undef,
# fullname => ''
# },
# commonpublic => { function => undef,
# fullname => ''
# },
# applepublic => { function => undef,
# fullname => ''
# },
# xnet => { function => undef,
# fullname => ''
# },
# sunpublic => { function => undef,
# fullname => ''
# },
# eiffel => { function => undef,
# fullname => ''
# },
# w3c => { function => undef,
# fullname => ''
# },
# motosoto => { function => undef,
# fullname => ''
# },
# opengroup => { function => undef,
# fullname => ''
# },
# zopepublic => { function => undef,
# fullname => ''
# },
# u_illinois_ncsa=> { function => undef,
# fullname => ''
# },
);
sub Get_Standard_License
{
my ($choice) = @_;
$choice = lc ($choice);
return ($licenses{$choice}{function}) if (exists $licenses{$choice});
return ();
}
sub Verify_Standard_License
{
my ($choice) = @_;
return (exists $licenses{lc ($choice)});
}
sub interact
{
my ($class) = @_;
return (bless ({map { ($licenses{$_}{fullname})
? ($_ => $licenses{$_}{fullname})
: ()
} keys (%licenses)
}, ref ($class) || $class));
}
sub Display_License
{
my ($self, $choice) = @_;
my $p_license = Get_Standard_License ($choice);
return (join ("\n\n",
"=====================================================================",
"=====================================================================",
$p_license->{LICENSETEXT},
"=====================================================================",
"=====================================================================",
$p_license->{COPYRIGHT},
"=====================================================================",
"=====================================================================",
));
}
################################################ subroutine header begin ##
=head2 License_Apache
Purpose : Get the copyright pod text and LICENSE file text for this license
=cut
################################################## subroutine header end ##
sub License_Apache_1_1
{
my %license;
$license{COPYRIGHT} = <.
Portions of this software are based upon public domain software originally written
at the National Center for Supercomputing Applications, University of Illinois,
Urbana-Champaign.
EOFLICENSETEXT
return (\%license);
}
################################################ subroutine header begin ##
=head2 License_Artistic
Purpose : Get the copyright pod text and LICENSE file text for this license
=cut
################################################## subroutine header end ##
sub License_Artistic
{
my %license;
$license{COPYRIGHT} = < = Regents of the University of California
= University of California, Berkeley
= 1998
In the original BSD license, the first occurrence of the phrase "COPYRIGHT
HOLDERS AND CONTRIBUTORS" in the disclaimer read "REGENTS AND
CONTRIBUTORS".
Here is the license template:
Copyright (c) ,
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
Neither the name of the nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
EOFLICENSETEXT
return (\%license);
}
################################################ subroutine header begin ##
=head2 License_BSD
Purpose : Get the copyright pod text and LICENSE file text for this license
=cut
################################################## subroutine header end ##
sub License_BSD
{
my %license;
$license{COPYRIGHT} = <
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to
whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall
be included in all copies or substantial portions of the
Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT
WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
EOFLICENSETEXT
return (\%license);
}
################################################ subroutine header begin ##
=head2 License_MITRE
Purpose : Get the copyright pod text and LICENSE file text for this license
=cut
################################################## subroutine header end ##
sub License_MITRE
{
my %license;
$license{COPYRIGHT} = < Nokia and others. All Rights
Reserved.
Contributor(s):
______________________________________.
EOFLICENSETEXT
return (\%license);
}
################################################ subroutine header begin ##
=head2 License_Python
Purpose : Get the copyright pod text and LICENSE file text for this license
=cut
################################################## subroutine header end ##
sub License_Python
{
my %license;
$license{COPYRIGHT} = <
This software is provided 'as-is', without any express or
implied warranty. In no event will the authors be held liable
for any damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it
and redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be
misrepresented; you must not claim that you
wrote the original software. If you use this
software in a product, an acknowledgment in
the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly
marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered
from any source distribution.
EOFLICENSETEXT
return (\%license);
}
################################################ subroutine header begin ##
=head2 License_Perl
Purpose : Get the copyright pod text and LICENSE file text for this license
=cut
################################################## subroutine header end ##
sub License_Perl
{
my %license;
my $gpl = License_GPL_2 ();
my $artistic = License_Artistic_w_Aggregation ();
$license{COPYRIGHT} = <{LICENSETEXT}
---------------------------------------------------------------------------
$artistic->{LICENSETEXT}
EOFLICENSETEXT
return (\%license);
}
################################################ subroutine header begin ##
=head2 Custom_Licenses
Purpose : Get the copyright pod text and LICENSE file text for some
custom license provided by the programmer
=cut
################################################## subroutine header end ##
sub Custom_Licenses
{
my %license;
$license{COPYRIGHT} = <