From c478e36851f9b192a09b93623046e503ef4c7270 Mon Sep 17 00:00:00 2001 From: Steve Bertrand Date: Wed, 23 Mar 2016 08:46:33 -0600 Subject: [PATCH] POD Updates, work on #43 - removed CONVENIENCE FEATURES details from the plugins, and pointed users to the Dancer::Database::Core::Handle POD - updated Copyright years - added LICENSE section to Dancer::Plugin::Database::Core::Handle --- Dancer1/README | 30 ++------------ Dancer1/lib/Dancer/Plugin/Database.pm | 33 ++------------- Dancer2/README | 2 +- Dancer2/lib/Dancer2/Plugin/Database.pm | 33 ++------------- Shared/README | 2 +- Shared/lib/Dancer/Plugin/Database/Core.pm | 2 +- .../lib/Dancer/Plugin/Database/Core/Handle.pm | 40 +++++++++++++++++++ 7 files changed, 55 insertions(+), 87 deletions(-) diff --git a/Dancer1/README b/Dancer1/README index d0cf743e..93403eca 100644 --- a/Dancer1/README +++ b/Dancer1/README @@ -196,35 +196,13 @@ GETTING A DATABASE HANDLE You can also pass a hashref of settings if you wish to provide settings at runtime. -CONVENIENCE FEATURES (quick_select, quick_update, quick_insert, quick_delete) +CONVENIENCE FEATURES The handle returned by the `database' keyword is a Dancer::Plugin::Database::Core::Handle object, which subclasses the `DBI::db' DBI connection handle. This means you can use it just like you'd - normally use a DBI handle, but extra convenience methods are provided, - as documented in the POD for Dancer::Plugin::Database::Core::Handle. + normally use a DBI handle, but extra convenience methods are provided. - Examples: - - # Quickly fetch the (first) row whose ID is 42 as a hashref: - my $row = database->quick_select($table_name, { id => 42 }); - - # Fetch all badgers as an array of hashrefs: - my @badgers = database->quick_select('animals', { genus => 'Mellivora' }); - - # Update the row where the 'id' column is '42', setting the 'foo' column to - # 'Bar': - database->quick_update($table_name, { id => 42 }, { foo => 'Bar' }); - - # Insert a new row, using a named connection (see above) - database('connectionname')->quick_insert($table_name, { foo => 'Bar' }); - - # Delete the row with id 42: - database->quick_delete($table_name, { id => 42 }); - - # Fetch all rows from a table (since version 1.30): - database->quick_select($table_name, {}); - - There's more extensive documentation on these features in + There's extensive documentation on these features in Dancer::Plugin::Database::Core::Handle, including using the `order_by', `limit', `columns' options to sort / limit results and include only specific columns. @@ -351,7 +329,7 @@ SUPPORT . LICENSE AND COPYRIGHT - Copyright 2010-12 David Precious. + Copyright 2010-2016 David Precious. This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published diff --git a/Dancer1/lib/Dancer/Plugin/Database.pm b/Dancer1/lib/Dancer/Plugin/Database.pm index 82daa850..d4534c75 100644 --- a/Dancer1/lib/Dancer/Plugin/Database.pm +++ b/Dancer1/lib/Dancer/Plugin/Database.pm @@ -259,39 +259,14 @@ You can also pass a hashref of settings if you wish to provide settings at runtime. -=head1 CONVENIENCE FEATURES (quick_select, quick_update, quick_insert, quick_delete, quick_count) +=head1 CONVENIENCE FEATURES The handle returned by the C keyword is a L object, which subclasses the C DBI connection handle. This means you can use it just like you'd normally use a DBI -handle, but extra convenience methods are provided, as documented in the POD for -L. +handle, but extra convenience methods are provided. -Examples: - - # Quickly fetch the (first) row whose ID is 42 as a hashref: - my $row = database->quick_select($table_name, { id => 42 }); - - # Fetch all badgers as an array of hashrefs: - my @badgers = database->quick_select('animals', { genus => 'Mellivora' }); - - # Update the row where the 'id' column is '42', setting the 'foo' column to - # 'Bar': - database->quick_update($table_name, { id => 42 }, { foo => 'Bar' }); - - # Insert a new row, using a named connection (see above) - database('connectionname')->quick_insert($table_name, { foo => 'Bar' }); - - # Delete the row with id 42: - database->quick_delete($table_name, { id => 42 }); - - # Fetch all rows from a table (since version 1.30): - database->quick_select($table_name, {}); - - # Retrieve a count of rows matching the criteria: - database->quick_count($table_name, {}); - -There's more extensive documentation on these features in +There's extensive documentation on these features in L, including using the C, C, C options to sort / limit results and include only specific columns. @@ -441,7 +416,7 @@ You can find the author on IRC in the channel C<#dancer> on . =head1 LICENSE AND COPYRIGHT -Copyright 2010-2015 David Precious. +Copyright 2010-2016 David Precious. This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published diff --git a/Dancer2/README b/Dancer2/README index c70429cf..d2979082 100644 --- a/Dancer2/README +++ b/Dancer2/README @@ -351,7 +351,7 @@ SUPPORT . LICENSE AND COPYRIGHT - Copyright 2010-12 David Precious. + Copyright 2010-2016 David Precious. This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published diff --git a/Dancer2/lib/Dancer2/Plugin/Database.pm b/Dancer2/lib/Dancer2/Plugin/Database.pm index 135b2b54..b83cc928 100644 --- a/Dancer2/lib/Dancer2/Plugin/Database.pm +++ b/Dancer2/lib/Dancer2/Plugin/Database.pm @@ -279,39 +279,14 @@ You can also pass a hashref of settings if you wish to provide settings at runtime. -=head1 CONVENIENCE FEATURES (quick_select, quick_update, quick_insert, quick_delete, quick_count) +=head1 CONVENIENCE FEATURES The handle returned by the C keyword is a L object, which subclasses the C DBI connection handle. This means you can use it just like you'd normally use a DBI -handle, but extra convenience methods are provided, as documented in the POD for -L. +handle, but extra convenience methods are provided. -Examples: - - # Quickly fetch the (first) row whose ID is 42 as a hashref: - my $row = database->quick_select($table_name, { id => 42 }); - - # Fetch all badgers as an array of hashrefs: - my @badgers = database->quick_select('animals', { genus => 'Mellivora' }); - - # Update the row where the 'id' column is '42', setting the 'foo' column to - # 'Bar': - database->quick_update($table_name, { id => 42 }, { foo => 'Bar' }); - - # Insert a new row, using a named connection (see above) - database('connectionname')->quick_insert($table_name, { foo => 'Bar' }); - - # Delete the row with id 42: - database->quick_delete($table_name, { id => 42 }); - - # Fetch all rows from a table (since version 1.30): - database->quick_select($table_name, {}); - - # Retrieve a count of rows matching the criteria: - database->quick_count($table_name, {}); - -There's more extensive documentation on these features in +There's extensive documentation on these features in L, including using the C, C, C options to sort / limit results and include only specific columns. @@ -460,7 +435,7 @@ You can find the author on IRC in the channel C<#dancer> on . =head1 LICENSE AND COPYRIGHT -Copyright 2010-13 David Precious. +Copyright 2010-2016 David Precious. This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published diff --git a/Shared/README b/Shared/README index 675b2b01..66e43c66 100644 --- a/Shared/README +++ b/Shared/README @@ -42,7 +42,7 @@ SUPPORT ACKNOWLEDGEMENTS LICENSE AND COPYRIGHT - Copyright 2013 David Precious. + Copyright 2016 David Precious. This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy diff --git a/Shared/lib/Dancer/Plugin/Database/Core.pm b/Shared/lib/Dancer/Plugin/Database/Core.pm index 25d3f3ce..746e0423 100644 --- a/Shared/lib/Dancer/Plugin/Database/Core.pm +++ b/Shared/lib/Dancer/Plugin/Database/Core.pm @@ -396,7 +396,7 @@ L =head1 LICENSE AND COPYRIGHT -Copyright 2013 David Precious. +Copyright 2016 David Precious. This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a diff --git a/Shared/lib/Dancer/Plugin/Database/Core/Handle.pm b/Shared/lib/Dancer/Plugin/Database/Core/Handle.pm index 101606f9..33b34b81 100644 --- a/Shared/lib/Dancer/Plugin/Database/Core/Handle.pm +++ b/Shared/lib/Dancer/Plugin/Database/Core/Handle.pm @@ -639,6 +639,46 @@ L and L L +=head1 LICENSE AND COPYRIGHT + +Copyright 2016 David Precious. + +This program is free software; you can redistribute it and/or modify it +under the terms of the the Artistic License (2.0). You may obtain a +copy of the full license at: + +L + +Any use, modification, and distribution of the Standard or Modified +Versions is governed by this Artistic License. By using, modifying or +distributing the Package, you accept this license. Do not use, modify, +or distribute the Package, if you do not accept this license. + +If your Modified Version has been derived from a Modified Version made +by someone other than you, you are nevertheless required to ensure that +your Modified Version complies with the requirements of this license. + +This license does not grant you the right to use any trademark, service +mark, tradename, or logo of the Copyright Holder. + +This license includes the non-exclusive, worldwide, free-of-charge +patent license to make, have made, use, er to sell, sell, import and +otherwise transfer the Package with respect to any patent claims +licensable by the Copyright Holder that are necessarily infringed by the +Package. If you institute patent litigation (including a cross-claim or +counterclaim) against any party alleging that the Package constitutes +direct or contributory patent infringement, then this Artistic License +to you shall terminate on the date that such litigation is filed. + +Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER +AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. +THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY +YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR +CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR +CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + =cut 1;