Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code: replace undef with proper values, #4165

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion web/cgi-bin/DivinumOfficium/dialogcommon.pl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ sub set_runtime_options {
my @setupt = split(/;;/, getsetup($name));

# pop(@setupt);
my $p = undef;
my $p;
my $i = 1;

foreach (@parameters) {
Expand Down
69 changes: 34 additions & 35 deletions web/cgi-bin/horas/horascommon.pl
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ sub occurrence {
} else
{ #if there is no Temporal file and we're not in Epiphany tide and there is no transfered temporal for the following day by day of Easter
$trank = '';
%tempora = undef;
%tempora = {};
$tname = '';
@trank = undef;
@trank = ();
}
}

Expand Down Expand Up @@ -207,9 +207,9 @@ sub occurrence {
} elsif ($month == 12 && $day == 23)
{ # ensure the Dominica IV adventus win in case it has a "1st Vespers" on Dec 23
$srank = '';
%saint = undef;
%saint = {};
$sname = '';
@srank = undef;
@srank = ();
}
} elsif ($hora =~ /(Vespera|Completorium)/i) {
$svesp = 3;
Expand All @@ -232,9 +232,9 @@ sub occurrence {
&& $srank[1] =~ /Semiduplex/i) # Reduced to Simplex/Comm ad Laudes tantum ends after None.
) {
$srank = '';
%saint = undef;
%saint = {};
$sname = '';
@srank = undef;
@srank = ();
} elsif (($version !~ /196/ || $dayofweek == 6)
&& $month == 11
&& $srank =~ /Omnium Fidelium defunctorum/i
Expand Down Expand Up @@ -274,9 +274,9 @@ sub occurrence {
&& (($trank[2] >= 6 && $srank[2] < 6) || ($trank[2] >= 5 && $srank[2] < 5)))
) {
$srank = '';
%saint = undef;
%saint = {};
$sname = '';
@srank = undef;
@srank = ();
@commemoentries = ();
} elsif (
$version =~ /196/
Expand All @@ -294,8 +294,8 @@ sub occurrence {
)
) {
$tname = $trank = '';
@trank = undef;
%tempora = undef;
@trank = ();
%tempora = {};
} elsif ($version =~ /1955|Monastic.*Divino|1963/
&& $srank[2] >= 2.2
&& $srank[2] < 2.9
Expand All @@ -315,10 +315,10 @@ sub occurrence {
}
} else {
$srank = '';
%saint = undef;
%saint = {};
$sname = '';
@srank = undef;
@commemoentries = undef;
@srank = ();
@commemoentries = ();
}

# In Festo Sanctae Mariae Sabbato according to the rubrics.
Expand Down Expand Up @@ -436,7 +436,7 @@ sub occurrence {
# for Tridentine: either Transfer or no Commemoration in Duplex I. cl. (of Sanctoral) unless dies 8va
$commemoratio = '';
$comrank = 0;
@commemoentries = undef;
@commemoentries = ();
} else {
$officename[2] =~ s/:/ ad Laudes \& Matutinum:/
if $srank[2] >= 5 && $cr[2] < 2 && $srank[0] !~ /infra octavam/i;
Expand Down Expand Up @@ -525,7 +525,7 @@ sub occurrence {
if ($version =~ /1960/ && $vespera == 1 && $rank >= 6 && $comrank < 5) {
$commemoratio = '';
$srank[2] = 0;
@commemoentries = undef;
@commemoentries = ();
}

my $climit1960 = climit1960($sname);
Expand Down Expand Up @@ -612,7 +612,7 @@ sub occurrence {
}
} else {
$commemoratio = '';
@commemoentries = undef;
@commemoentries = ();
}
} elsif (transfered($sday, $year, $version)) {
if ($hora !~ /Vespera|Completorium/i) {
Expand Down Expand Up @@ -699,8 +699,8 @@ sub concurrence {
my @wrank = $sanctoraloffice ? @srank : @trank;

if ($winner{Rule} =~ /No secunda Vespera/i && $version !~ /196[03]/i) {
@wrank = undef;
%winner = undef;
@wrank = ();
%winner = {};
$winner = '';
} elsif ($dayname[0] =~ /Quadp3/ && $dayofweek == 3 && $version !~ /1960|1955/) {

Expand Down Expand Up @@ -743,11 +743,11 @@ sub concurrence {
shift @commemoentries;
}
} else {
%winner = undef;
%winner = {};
$winner = '';
$rank = 0;
}
%tempora = undef;
%tempora = {};
@trank = '';
$tname = '';
}
Expand Down Expand Up @@ -783,8 +783,8 @@ sub concurrence {
$dayname[2] = $tomorrowname[2] . "<br/>Vespera de Officium occurente, Commemoratio Sanctorum tantum";
$cwrank = '';
$ctname = '';
%cwinner = undef;
@cwrank = undef;
%cwinner = {};
@cwrank = ();
$cwinner = '';
$crank = 0;
$cvespera = 0;
Expand All @@ -795,8 +795,8 @@ sub concurrence {
$dayname[2] .= "<br/>Vespera de Officium occurente; nihil de sequenti";
$cwrank = '';
$csname = '';
%cwinner = undef;
@cwrank = undef;
%cwinner = {};
@cwrank = ();
$cwinner = '';
$crank = 0;
$cvespera = 0;
Expand All @@ -807,8 +807,8 @@ sub concurrence {
$dayname[2] .= "<br/>Vespera de Officium occurente " unless $version =~ /1955|196/;
$cwrank = '';
$ctname = '';
%cwinner = undef;
@cwrank = undef;
%cwinner = {};
@cwrank = ();
$cwinner = '';
$crank = 0;
$cvespera = 0;
Expand All @@ -835,16 +835,16 @@ sub concurrence {
$commune = $ccommune;
$communetype = $ccommunetype;
$cwinner = '';
%cwinner = undef;
@cwrank = undef;
%cwinner = {};
@cwrank = ();
} else {
$vespera = 3;
$tvesp = 3;
$dayname[2] .= "<br/>Vespera de præcedenti; nihil de sequenti (tempora)";
$ctrank = '';
$ctname = '';
%cwinner = undef;
@cwrank = undef;
%cwinner = {};
@cwrank = ();
$cwinner = '';
$crank = 0;
$cvespera = 0;
Expand Down Expand Up @@ -1075,7 +1075,6 @@ sub concurrence {
@comentries = ();

foreach $commemo (@commemoentries) {
next unless $commemo;

if ($commemo =~ /tempora/i && ($trank[2] < 2 || $trank[0] =~ /Rogatio|Quattuor.*Sept/i)) {
next;
Expand Down Expand Up @@ -1391,22 +1390,22 @@ sub precedence {

if ($version =~ /1960/ && $winner{Rule} =~ /Festum Domini/ && $commemoratio{Rule} =~ /Festum Domini/i) {
$commemoratio = '';
%commemoratio = undef;
%commemoratio = {};
$dayname[2] = '';
@commemoentries = ();
}

if ($version =~ /196/ && $commemoratio =~ /06-28r?/i && $dayofweek == 0) {
$commemoratio = '';
%commemoratio = undef;
%commemoratio = {};
$dayname[2] = '';
@commemoentries = ();
}

if ($vespera == $svesp && $vespera == 1 && $cvespera == 3 && $commemoratio{Rule} =~ /No second Vespera/i)
{ # should be obsolte already
$commemoratio = '';
%commemoratio = undef;
%commemoratio = {};
$dayname[2] = '';
@commemoentries = ();
}
Expand All @@ -1418,7 +1417,7 @@ sub precedence {
#
# if ($version =~ /196/ && $winner{Rule} =~ /Festum Domini/ && $commemoratio1{Rule} =~ /Festum Domini/) {
# $commemoratio1 = '';
# %commemoratio1 = undef;
# %commemoratio1 = {};
# $dayname[2] = '';
# }
# }
Expand Down
7 changes: 3 additions & 4 deletions web/cgi-bin/horas/specials/orationes.pl
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ sub oratio {
{
$c = getrefs($w{Commemoratio}, $lang, $vespera, $w{Rule});
} else {
$c = undef;
$c = '';
}

if ($c && $octvespera && $c =~ /$octavestring/i) {
Expand Down Expand Up @@ -325,7 +325,7 @@ sub oratio {
{
$c = getrefs($c{Commemoratio}, $lang, $cvespera, $c{Rule});
} else {
$c = undef;
$c = '';
}

if ($c && $octvespera && $c =~ /$octavestring/i) {
Expand Down Expand Up @@ -378,7 +378,6 @@ sub oratio {
my @centries = $cv == 1 ? @ccommemoentries : @commemoentries;

foreach my $commemo (@centries) {
next unless $commemo;
setbuild2("Comm-$cv: $commemo");

my $key = 0; # let's start with lowest rank
Expand Down Expand Up @@ -424,7 +423,7 @@ sub oratio {
{
$c = getrefs($c{Commemoratio}, $lang, $cv, $c{Rule});
} else {
$c = undef;
$c = '';
}

if ($c && $octvespera && $c =~ /$octavestring/) {
Expand Down
4 changes: 2 additions & 2 deletions web/cgi-bin/horas/specmatins.pl
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ sub lectio : ScriptFunc {
if ($version =~ /Trident/ && $winner =~ /Sancti/ && $rank < 2) {

# dirty hack to fix 3932
$w{Responsory1} = $w{Responsory2} = undef;
$w{Responsory1} = $w{Responsory2} = '';
}
if ($w && $num == 1) { setbuild2("Lectio1 ex scriptura"); }
} elsif (!$w && $num == 4 && exists($commemoratio{"Lectio$num"}) && ($version =~ /1960/i))
Expand Down Expand Up @@ -1438,7 +1438,7 @@ sub StJamesRule {
my $num = shift;
my $s = shift;
my %w = %$w;
my %w1 = undef;
my %w1 = {};
my $key;

if ($w{Rank} =~ /Dominica/i && prevdayl1($s)) {
Expand Down