From e6f7600117093c38a4a1c5aa9ccd0af26e6852fb Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Mon, 2 Sep 2013 15:44:50 -0700 Subject: [PATCH] Remove use of bare qw() in for blocks. Was deprecated in Perl 5.16 and made a syntax error in Perl 5.18. Resolves --- inst/dist_sql.pl | 2 +- inst/upgrade/1.10.6/update_doc_version_indexes.pl | 2 +- inst/upgrade/1.11.1/add_displayed.pl | 2 +- inst/upgrade/1.11.2/cover_date_not_null.pl | 2 +- inst/upgrade/1.8.1/fix_orphan_assets.pl | 2 +- lib/Bric/SOAP/Media.pm | 4 ++-- lib/Bric/SOAP/Story.pm | 4 ++-- lib/Bric/SOAP/Template.pm | 4 ++-- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/inst/dist_sql.pl b/inst/dist_sql.pl index 141811193..9d40da2ee 100644 --- a/inst/dist_sql.pl +++ b/inst/dist_sql.pl @@ -25,7 +25,7 @@ =head1 See Also my @rdbmss = map { s{^sql/}{}; $_ } grep { $_ !~ /[.]svn/ } @ARGV; for my $rdbms (@rdbmss) { - for my $type qw(sql val con) { + for my $type (qw(sql val con)) { my $dir = $type eq 'sql' ? '>' : '>>'; system ( "grep -vh '^--' `find sql/$rdbms -name '*.$type' | env " diff --git a/inst/upgrade/1.10.6/update_doc_version_indexes.pl b/inst/upgrade/1.10.6/update_doc_version_indexes.pl index 9cc52bf80..dafffb856 100644 --- a/inst/upgrade/1.10.6/update_doc_version_indexes.pl +++ b/inst/upgrade/1.10.6/update_doc_version_indexes.pl @@ -6,7 +6,7 @@ use lib catdir $FindBin::Bin, updir, 'lib'; use bric_upgrade qw(:all); -for my $doc qw(story media) { +for my $doc (qw(story media)) { next if test_index "udx_$doc\__$doc\_instance"; my $on = DBD_TYPE eq 'mysql' ? " ON $doc\_instance" : ''; do_sql diff --git a/inst/upgrade/1.11.1/add_displayed.pl b/inst/upgrade/1.11.1/add_displayed.pl index 20cd84c14..f04cdb9d2 100644 --- a/inst/upgrade/1.11.1/add_displayed.pl +++ b/inst/upgrade/1.11.1/add_displayed.pl @@ -13,7 +13,7 @@ }; } -for my $doc qw(story media) { +for my $doc (qw(story media)) { next if test_column "$doc\_element", 'displayed'; do_sql qq{ ALTER TABLE $doc\_element diff --git a/inst/upgrade/1.11.2/cover_date_not_null.pl b/inst/upgrade/1.11.2/cover_date_not_null.pl index a4d8ddf93..247eb740d 100644 --- a/inst/upgrade/1.11.2/cover_date_not_null.pl +++ b/inst/upgrade/1.11.2/cover_date_not_null.pl @@ -6,7 +6,7 @@ use lib catdir $FindBin::Bin, updir, 'lib'; use bric_upgrade qw(:all); -for my $doc qw(story media) { +for my $doc (qw(story media)) { # Skip it if the cover_date column is already NOT NULL. next if test_column "$doc\_instance", 'cover_date', undef, 1; diff --git a/inst/upgrade/1.8.1/fix_orphan_assets.pl b/inst/upgrade/1.8.1/fix_orphan_assets.pl index 2d37ac0b5..4e075ffdb 100644 --- a/inst/upgrade/1.8.1/fix_orphan_assets.pl +++ b/inst/upgrade/1.8.1/fix_orphan_assets.pl @@ -6,7 +6,7 @@ use lib catdir $FindBin::Bin, updir, 'lib'; use bric_upgrade qw(:all); -for my $type qw(story formatting media) { +for my $type (qw(story formatting media)) { do_sql "DELETE from member WHERE id IN (SELECT member__id FROM $type\_member, $type, member, grp diff --git a/lib/Bric/SOAP/Media.pm b/lib/Bric/SOAP/Media.pm index 51f2cbb93..bd3537e68 100644 --- a/lib/Bric/SOAP/Media.pm +++ b/lib/Bric/SOAP/Media.pm @@ -701,7 +701,7 @@ sub load_asset { # mix in dates $mdata->{publish_date} ||= $mdata->{first_publish_date} if $mdata->{first_publish_date}; - for my $name qw(cover_date expire_date publish_date first_publish_date) { + for my $name (qw(cover_date expire_date publish_date first_publish_date)) { my $date = $mdata->{$name}; if ($date) { throw_ap error => __PACKAGE__ . "::create : $name must be undefined if publish_status is false" @@ -1059,7 +1059,7 @@ sub serialize_asset { $writer->dataElement(source => $src->get_source_name); # get dates and output them in dateTime format - for my $name qw(cover_date expire_date publish_date first_publish_date) { + for my $name (qw(cover_date expire_date publish_date first_publish_date)) { my $date = $media->_get($name); next unless $date; # skip missing date my $xs_date = db_date_to_xs_date($date); diff --git a/lib/Bric/SOAP/Story.pm b/lib/Bric/SOAP/Story.pm index 695dd9cfd..aea2d8121 100644 --- a/lib/Bric/SOAP/Story.pm +++ b/lib/Bric/SOAP/Story.pm @@ -911,7 +911,7 @@ sub load_asset { # assign dates $sdata->{publish_date} ||= $sdata->{first_publish_date} if $sdata->{first_publish_date}; - for my $name qw(cover_date expire_date publish_date first_publish_date) { + for my $name (qw(cover_date expire_date publish_date first_publish_date)) { my $date = $sdata->{$name}; if ($date) { throw_ap error => __PACKAGE__ . "::create : $name must be undefined if publish_status is false" @@ -1196,7 +1196,7 @@ sub serialize_asset { $writer->dataElement(source => $src->get_source_name); # get dates and output them in dateTime format - for my $name qw(cover_date expire_date publish_date first_publish_date) { + for my $name (qw(cover_date expire_date publish_date first_publish_date)) { my $date = $story->_get($name); next unless $date; # skip missing date my $xs_date = db_date_to_xs_date($date); diff --git a/lib/Bric/SOAP/Template.pm b/lib/Bric/SOAP/Template.pm index 3fea0a187..7faedb787 100644 --- a/lib/Bric/SOAP/Template.pm +++ b/lib/Bric/SOAP/Template.pm @@ -633,7 +633,7 @@ sub load_asset { } # mix in dates - for my $name qw(expire_date deploy_date) { + for my $name (qw(expire_date deploy_date)) { my $date = $tdata->{$name}; if ($date) { throw_ap error => __PACKAGE__ . "::create : $name must be undefined if deploy_status is false" @@ -848,7 +848,7 @@ sub serialize_asset { $writer->dataElement(output_channel => $oc->get_name); # get dates and output them in dateTime format - for my $name qw(expire_date deploy_date) { + for my $name (qw(expire_date deploy_date)) { my $date = $template->_get($name); next unless $date; # skip missing date my $xs_date = db_date_to_xs_date($date);