File Coverage

blib/lib/Regexp/Pattern/Filename/Type/Media.pm
Criterion Covered Total %
statement 11 11 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 15 15 100.0


line stmt bran cond sub pod time code
1             package Regexp::Pattern::Filename::Type::Media;
2              
3 1     1   385584 use 5.010001;
  1         4  
4 1     1   6 use strict;
  1         1  
  1         31  
5 1     1   6 use warnings;
  1         2  
  1         65  
6             #use utf8;
7              
8 1     1   647 use Filename::Type::Media ();
  1         952  
  1         207  
9              
10             our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
11             our $DATE = '2024-12-21'; # DATE
12             our $DIST = 'Regexp-Pattern-Filename-Type-Media'; # DIST
13             our $VERSION = '0.003'; # VERSION
14              
15             our %RE;
16              
17             $RE{filename_type_media} = {
18             summary => 'Media (image/audio/video) filename',
19             pat => $Filename::Type::Media::RE,
20             tags => ['anchored'],
21             examples => [
22             {str=>'foo', matches=>0, summary=>'No extension'},
23             {str=>'mp4', matches=>0, summary=>'Not an extension'},
24             {str=>'foo.jpg', matches=>1},
25             {str=>'foo.mp3', matches=>1},
26             {str=>'foo.mp4', matches=>1},
27             {str=>'foo bar.MKV', matches=>1, summary=>'Case insensitive'},
28             {str=>'foo.MKV is the file', matches=>0, summary=>'Regex is anchored'},
29             {str=>'foo.txt', matches=>0},
30             ],
31             };
32              
33             1;
34             # ABSTRACT: Media (image/audio/video) filename
35              
36             __END__