perlcritic: Readonly -> ReadonlyX

This commit is contained in:
Graham Christensen 2021-12-14 10:03:18 -05:00
parent fc49a7129d
commit a658b80863
2 changed files with 28 additions and 13 deletions

View file

@ -199,6 +199,21 @@
}; };
}; };
ReadonlyX = final.perlPackages.buildPerlModule {
pname = "ReadonlyX";
version = "1.04";
src = final.fetchurl {
url = "mirror://cpan/authors/id/S/SA/SANKO/ReadonlyX-1.04.tar.gz";
sha256 = "81bb97dba93ac6b5ccbce04a42c3590eb04557d75018773ee18d5a30fcf48188";
};
buildInputs = with final.perlPackages; [ ModuleBuildTiny TestFatal ];
meta = {
homepage = "https://github.com/sanko/readonly";
description = "Faster facility for creating read-only scalars, arrays, hashes";
license = final.lib.licenses.artistic2;
};
};
TieHashMethod = final.buildPerlPackage { TieHashMethod = final.buildPerlPackage {
pname = "Tie-Hash-Method"; pname = "Tie-Hash-Method";
version = "0.02"; version = "0.02";
@ -472,7 +487,7 @@
ParallelForkManager ParallelForkManager
PerlCriticCommunity PerlCriticCommunity
PrometheusTinyShared PrometheusTinyShared
Readonly ReadonlyX
SetScalar SetScalar
SQLSplitStatement SQLSplitStatement
Starman Starman

View file

@ -4,7 +4,7 @@ use utf8;
use strict; use strict;
use warnings; use warnings;
use Exporter; use Exporter;
use Readonly; use ReadonlyX;
use Nix::Store; use Nix::Store;
use Hydra::Helper::Nix; use Hydra::Helper::Nix;
@ -34,7 +34,7 @@ our @EXPORT = qw(
# Columns from the Builds table needed to render build lists. # Columns from the Builds table needed to render build lists.
Readonly our @buildListColumns => ('id', 'finished', 'timestamp', 'stoptime', 'project', 'jobset', 'job', 'nixname', 'system', 'buildstatus', 'releasename'); Readonly::Array our @buildListColumns => ('id', 'finished', 'timestamp', 'stoptime', 'project', 'jobset', 'job', 'nixname', 'system', 'buildstatus', 'releasename');
sub getBuild { sub getBuild {
@ -317,16 +317,16 @@ sub paramToList {
# Security checking of filenames. # Security checking of filenames.
Readonly our $pathCompRE => "(?:[A-Za-z0-9-\+\._\$][A-Za-z0-9-\+\._\$:]*)"; Readonly::Scalar our $pathCompRE => "(?:[A-Za-z0-9-\+\._\$][A-Za-z0-9-\+\._\$:]*)";
Readonly our $relPathRE => "(?:$pathCompRE(?:/$pathCompRE)*)"; Readonly::Scalar our $relPathRE => "(?:$pathCompRE(?:/$pathCompRE)*)";
Readonly our $relNameRE => "(?:[A-Za-z0-9-_][A-Za-z0-9-\._]*)"; Readonly::Scalar our $relNameRE => "(?:[A-Za-z0-9-_][A-Za-z0-9-\._]*)";
Readonly our $attrNameRE => "(?:[A-Za-z_][A-Za-z0-9-_]*)"; Readonly::Scalar our $attrNameRE => "(?:[A-Za-z_][A-Za-z0-9-_]*)";
Readonly our $projectNameRE => "(?:[A-Za-z_][A-Za-z0-9-_]*)"; Readonly::Scalar our $projectNameRE => "(?:[A-Za-z_][A-Za-z0-9-_]*)";
Readonly our $jobsetNameRE => "(?:[A-Za-z_][A-Za-z0-9-_\.]*)"; Readonly::Scalar our $jobsetNameRE => "(?:[A-Za-z_][A-Za-z0-9-_\.]*)";
Readonly our $jobNameRE => "(?:$attrNameRE(?:\\.$attrNameRE)*)"; Readonly::Scalar our $jobNameRE => "(?:$attrNameRE(?:\\.$attrNameRE)*)";
Readonly our $systemRE => "(?:[a-z0-9_]+-[a-z0-9_]+)"; Readonly::Scalar our $systemRE => "(?:[a-z0-9_]+-[a-z0-9_]+)";
Readonly our $userNameRE => "(?:[a-z][a-z0-9_\.]*)"; Readonly::Scalar our $userNameRE => "(?:[a-z][a-z0-9_\.]*)";
Readonly our $inputNameRE => "(?:[A-Za-z_][A-Za-z0-9-_]*)"; Readonly::Scalar our $inputNameRE => "(?:[A-Za-z_][A-Za-z0-9-_]*)";
sub parseJobsetName { sub parseJobsetName {