From bc4f53e47a2225dfb763a19ff24393a6be14edbd Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 8 Feb 2015 21:52:35 +0100 Subject: [PATCH] Switched to common::sense --- README | 1 + bin/gal-cache | 3 +-- bin/gal-date | 3 +-- bin/gal-dump-config | 3 +-- bin/gal-dump-meta | 3 +-- bin/gal-from-gqview | 3 +-- bin/gal-gen | 3 +-- bin/gal-mj-digikam | 3 +-- bin/gal-mj-init | 4 +--- bin/gal-mj-map | 3 +-- bin/gal-mj-migrate-check | 3 +-- bin/gal-mj-upgrade | 7 ++----- bin/gal-mj-upload | 3 +-- bin/gal-scan | 3 +-- example/default.cf | 4 +--- example/gallery.cgi | 3 +-- gal | 3 +-- lib/UCW/Gallery.pm | 3 +-- lib/UCW/Gallery/Archive.pm | 3 +-- lib/UCW/Gallery/Hashes.pm | 3 +-- lib/UCW/Gallery/Web.pm | 3 +-- lib/UCW/Gallery/Web/HighSlide.pm | 3 +-- lib/UCW/Gallery/Web/NrtBlue.pm | 3 +-- lib/UCW/Gallery/Web/Plain.pm | 3 +-- 24 files changed, 25 insertions(+), 51 deletions(-) diff --git a/README b/README index 0aed6db..5fbcd6d 100644 --- a/README +++ b/README @@ -19,6 +19,7 @@ Perl with the following non-core modules: o Image::Exif o Archive::Zip o Digest::SHA + o common::sense Files and directories ~~~~~~~~~~~~~~~~~~~~~ diff --git a/bin/gal-cache b/bin/gal-cache index 73c97db..263ec9c 100755 --- a/bin/gal-cache +++ b/bin/gal-cache @@ -2,8 +2,7 @@ # UCW Gallery: Prepare cache # (c) 2004--2012 Martin Mares -use strict; -use warnings; +use common::sense; use UCW::Gallery; use Image::Magick; diff --git a/bin/gal-date b/bin/gal-date index 451201c..c78eda0 100755 --- a/bin/gal-date +++ b/bin/gal-date @@ -2,8 +2,7 @@ # UCW Gallery: Symlink photos according to their EXIF timestamps # (c) 2013 Martin Mares -use strict; -use warnings; +use common::sense; use Image::EXIF; use Getopt::Long; diff --git a/bin/gal-dump-config b/bin/gal-dump-config index 600a9d5..f4489bf 100755 --- a/bin/gal-dump-config +++ b/bin/gal-dump-config @@ -2,8 +2,7 @@ # UCW Gallery: Show configuration variables # (c) 2004--2012 Martin Mares -use strict; -use warnings; +use common::sense; use UCW::Gallery; use Data::Dumper; diff --git a/bin/gal-dump-meta b/bin/gal-dump-meta index 1734183..6948fb5 100755 --- a/bin/gal-dump-meta +++ b/bin/gal-dump-meta @@ -2,8 +2,7 @@ # UCW Gallery: Dump meta-data # (c) 2004--2012 Martin Mares -use strict; -use warnings; +use common::sense; use UCW::Gallery; use Data::Dumper; diff --git a/bin/gal-from-gqview b/bin/gal-from-gqview index 138af5a..836c457 100755 --- a/bin/gal-from-gqview +++ b/bin/gal-from-gqview @@ -2,8 +2,7 @@ # UCW Gallery: Extract image list from GQview collection # (c) 2004--2012 Martin Mares -use strict; -use warnings; +use common::sense; while (<>) { chomp; diff --git a/bin/gal-gen b/bin/gal-gen index 1ee10b0..7c36884 100755 --- a/bin/gal-gen +++ b/bin/gal-gen @@ -2,8 +2,7 @@ # UCW Gallery: Generate published photos # (c) 2004--2015 Martin Mares -use strict; -use warnings; +use common::sense; use UCW::Gallery; use Image::EXIF; diff --git a/bin/gal-mj-digikam b/bin/gal-mj-digikam index 8576f89..3598573 100755 --- a/bin/gal-mj-digikam +++ b/bin/gal-mj-digikam @@ -1,7 +1,6 @@ #!/usr/bin/perl -use strict; -use warnings; +use common::sense; use Cwd; use DBI; diff --git a/bin/gal-mj-init b/bin/gal-mj-init index 1105254..4f932f8 100755 --- a/bin/gal-mj-init +++ b/bin/gal-mj-init @@ -7,9 +7,7 @@ if [ -f gallery.cf ] ; then fi cat >gallery.cf <<'AMEN' -use strict; -use warnings; -use utf8; +use common::sense; my $gal = require '../../default.cf'; $gal->set( diff --git a/bin/gal-mj-map b/bin/gal-mj-map index b9f48d9..aedd974 100755 --- a/bin/gal-mj-map +++ b/bin/gal-mj-map @@ -1,7 +1,6 @@ #!/usr/bin/perl -use strict; -use warnings; +use common::sense; use Digest::SHA; use File::Find; diff --git a/bin/gal-mj-migrate-check b/bin/gal-mj-migrate-check index 5936f32..e7762a6 100755 --- a/bin/gal-mj-migrate-check +++ b/bin/gal-mj-migrate-check @@ -1,8 +1,7 @@ #!/usr/bin/perl # Check that thumbnail aspect ratios match pre-migration data -use strict; -use warnings; +use common::sense; use UCW::Gallery; diff --git a/bin/gal-mj-upgrade b/bin/gal-mj-upgrade index 66c260f..da019f6 100755 --- a/bin/gal-mj-upgrade +++ b/bin/gal-mj-upgrade @@ -1,7 +1,6 @@ #!/usr/bin/perl -use strict; -use warnings; +use common::sense; use UCW::Gallery; use File::Spec; @@ -133,9 +132,7 @@ if (scalar keys %found_dirs != 1) { open CF, ">$album/gallery.cf" or die "Cannot create $album/gallery.cf"; print CF <<'AMEN' ; -use strict; -use warnings; -use utf8; +use common::sense; my $gal = require '../../default.cf'; $gal->set( diff --git a/bin/gal-mj-upload b/bin/gal-mj-upload index 6fc7cf1..67aae53 100755 --- a/bin/gal-mj-upload +++ b/bin/gal-mj-upload @@ -1,7 +1,6 @@ #!/usr/bin/perl -use strict; -use warnings; +use common::sense; print "## Updating Git\n"; system "git", "pull"; diff --git a/bin/gal-scan b/bin/gal-scan index a976d5d..bb74c06 100755 --- a/bin/gal-scan +++ b/bin/gal-scan @@ -2,8 +2,7 @@ # UCW Gallery: Scan images and generate image list # (c) 2004--2015 Martin Mares -use strict; -use warnings; +use common::sense; use UCW::Gallery; use UCW::Gallery::Hashes; diff --git a/example/default.cf b/example/default.cf index a43f20c..d4aa89a 100644 --- a/example/default.cf +++ b/example/default.cf @@ -1,8 +1,6 @@ # Generic configuration file for UCW::Gallery -use strict; -use warnings; -use utf8; +use common::sense; use UCW::Gallery; use Cwd; diff --git a/example/gallery.cgi b/example/gallery.cgi index b20d8b4..053155b 100644 --- a/example/gallery.cgi +++ b/example/gallery.cgi @@ -1,7 +1,6 @@ #!/usr/bin/perl -use strict; -use warnings; +use common::sense; use lib $ENV{'DOCUMENT_ROOT'} . "/../lib/gal/lib"; use lib $ENV{'DOCUMENT_ROOT'} . "/../lib/perl"; diff --git a/gal b/gal index 6c4daae..033ba17 100755 --- a/gal +++ b/gal @@ -2,8 +2,7 @@ # UCW Gallery -- Master Program # (c) 2012 Martin Mares -use strict; -use warnings; +use common::sense; use Getopt::Long; use FindBin; diff --git a/lib/UCW/Gallery.pm b/lib/UCW/Gallery.pm index 748fe3c..ef0fc10 100644 --- a/lib/UCW/Gallery.pm +++ b/lib/UCW/Gallery.pm @@ -3,8 +3,7 @@ package UCW::Gallery; -use strict; -use warnings; +use common::sense; use File::Spec; use Storable; diff --git a/lib/UCW/Gallery/Archive.pm b/lib/UCW/Gallery/Archive.pm index fb7c40b..0acfa7b 100644 --- a/lib/UCW/Gallery/Archive.pm +++ b/lib/UCW/Gallery/Archive.pm @@ -3,8 +3,7 @@ package UCW::Gallery::Archive; -use strict; -use warnings; +use common::sense; use Archive::Zip; use File::Spec; diff --git a/lib/UCW/Gallery/Hashes.pm b/lib/UCW/Gallery/Hashes.pm index d0414e9..233fabb 100644 --- a/lib/UCW/Gallery/Hashes.pm +++ b/lib/UCW/Gallery/Hashes.pm @@ -3,8 +3,7 @@ package UCW::Gallery::Hashes; -use strict; -use warnings; +use common::sense; use File::stat (); use Digest::SHA; diff --git a/lib/UCW/Gallery/Web.pm b/lib/UCW/Gallery/Web.pm index ccca477..4b39e3b 100644 --- a/lib/UCW/Gallery/Web.pm +++ b/lib/UCW/Gallery/Web.pm @@ -3,8 +3,7 @@ package UCW::Gallery::Web; -use strict; -use warnings; +use common::sense; use UCW::Gallery; use UCW::CGI; diff --git a/lib/UCW/Gallery/Web/HighSlide.pm b/lib/UCW/Gallery/Web/HighSlide.pm index b1e503b..2ce3fa5 100644 --- a/lib/UCW/Gallery/Web/HighSlide.pm +++ b/lib/UCW/Gallery/Web/HighSlide.pm @@ -3,8 +3,7 @@ package UCW::Gallery::Web::HighSlide; -use strict; -use warnings; +use common::sense; use utf8; use UCW::Gallery; diff --git a/lib/UCW/Gallery/Web/NrtBlue.pm b/lib/UCW/Gallery/Web/NrtBlue.pm index 7fc5637..ba669a4 100644 --- a/lib/UCW/Gallery/Web/NrtBlue.pm +++ b/lib/UCW/Gallery/Web/NrtBlue.pm @@ -4,8 +4,7 @@ package UCW::Gallery::Web::NrtBlue; -use strict; -use warnings; +use common::sense; use UCW::Gallery; use UCW::Gallery::Web; diff --git a/lib/UCW/Gallery/Web/Plain.pm b/lib/UCW/Gallery/Web/Plain.pm index f7d213c..255eb89 100644 --- a/lib/UCW/Gallery/Web/Plain.pm +++ b/lib/UCW/Gallery/Web/Plain.pm @@ -3,8 +3,7 @@ package UCW::Gallery::Web::Plain; -use strict; -use warnings; +use common::sense; use UCW::Gallery; use UCW::Gallery::Web; -- 2.39.2