Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove use of bare qw() in for blocks.

Was deprecated in Perl 5.16 and made a syntax error in Perl 5.18. Resolves
  • Loading branch information...
commit ba1cb6ffbf3811643f55da2934ef0d6fc637a005 1 parent 400b8a7
@theory theory authored
View
2  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 "
View
2  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
View
2  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
View
2  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;
View
2  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
View
4 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);
View
4 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);
View
4 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);
Please sign in to comment.
Something went wrong with that request. Please try again.