Skip to content

Commit

Permalink
Remove use of bare qw() in for blocks.
Browse files Browse the repository at this point in the history
Was deprecated in Perl 5.16 and made a syntax error in Perl 5.18. Resolves
  • Loading branch information
theory committed Sep 2, 2013
1 parent 70f2503 commit e6f7600
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion inst/dist_sql.pl
Expand Up @@ -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 "
Expand Down
2 changes: 1 addition & 1 deletion inst/upgrade/1.10.6/update_doc_version_indexes.pl
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion inst/upgrade/1.11.1/add_displayed.pl
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion inst/upgrade/1.11.2/cover_date_not_null.pl
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion inst/upgrade/1.8.1/fix_orphan_assets.pl
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions lib/Bric/SOAP/Media.pm
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions lib/Bric/SOAP/Story.pm
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions lib/Bric/SOAP/Template.pm
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e6f7600

Please sign in to comment.