Perl/Release.pm

filter: Statementstmt 100% 9 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 1 / 1 Podpod n/a totaltotal 100% 10 / 10 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
CRAP 1.0
« Perl/Module.pm ↑ Summary
1 package Regexp::Pattern::Perl::Release;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 #use warnings;
5  
6 1 our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
7 1 our $DATE = '2022-07-30'; # DATE
8 1 our $DIST = 'Regexp-Pattern-Perl'; # DIST
9 1 our $VERSION = '0.007'; # VERSION
10  
11 1 our %RE = (
12 perl_release_archive_filename => {
13 summary => 'Proper filename of a typical distribution release archive (tarball/zip)',
14 pat => qr/([A-Za-z_][A-Za-z0-9_]*(?:-[A-Za-z0-9_][A-Za-z0-9_]*)*)-
15 v?([0-9]+(?:\.[0-9]+){0,4}(?:_[0-9]+|-TRIAL)?)
16 \.(tar|tar\.(?:Z|gz|bz2|xz)|zip|rar)/x,
17 tags => ['capturing'],
18 examples => [
19 {str=>'Acme-CPANModulesBundle-Import-PerlAdvent-2000-0.001.tar.gz', gen_args=>{-anchor=>1}, matches=>1},
20 {str=>'Acme-CPANModulesBundle-Import-PerlAdvent-2000-v0.001.tar.gz', gen_args=>{-anchor=>1}, matches=>1, summary=>'v prefix before version number allowed'},
21 {str=>'0.001.tar.gz', gen_args=>{-anchor=>1}, matches=>0, summary=>'No distribution name'},
22 {str=>'Acme-CPANModulesBundle-Import-PerlAdvent-2000.tar.gz', gen_args=>{-anchor=>1}, matches=>1, summary=>'Unfortunately, numeric namespace name gets mistaken as version number'},
23 {str=>'Acme-CPANModulesBundle-Import-PerlAdvent.tar.gz', gen_args=>{-anchor=>1}, matches=>0, summary=>'No version number'},
24 ],
25 },
26 );
27  
28 1 1;
29 # ABSTRACT: Regexp patterns related to Perl release
30  
31 __END__
« Perl/Module.pm ↑ Summary