File Coverage

blib/lib/Regexp/Pattern/Filename/Type/Video/WhatsApp.pm
Criterion Covered Total %
statement 8 8 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 11 11 100.0


line stmt bran cond sub pod time code
1             package Regexp::Pattern::Filename::Type::Video::WhatsApp;
2              
3 1     1   276312 use 5.010001;
  1         4  
4 1     1   4 use strict;
  1         2  
  1         28  
5 1     1   5 use warnings;
  1         1  
  1         206  
6             #use utf8;
7              
8             our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
9             our $DATE = '2024-12-21'; # DATE
10             our $DIST = 'Regexp-Pattern-Filename-Type-Video-WhatsApp'; # DIST
11             our $VERSION = '0.004'; # VERSION
12              
13             our %RE;
14              
15             $RE{filename_type_video_whatsapp} = {
16             summary => 'Video filename saved by WhatsApp',
17             pat => qr/\AVID-[0-9]{8}-WA[0-9]{4,}\.(?:MP4|mp4)\z/,
18             tags => ['anchored'],
19             examples => [
20             {str=>'foo.mp4', matches=>0, summary=>'No pattern'},
21             {str=>'IMG-20210922-WA0001.jpg', matches=>0, summary=>'Image, not video'},
22             {str=>'VID-20210922-WA0001.mp4', matches=>1},
23             {str=>'VID-20210922-WA0001.jpg', matches=>0, summary=>'Wrong extension'},
24             ],
25             };
26              
27             1;
28             # ABSTRACT: Video filename saved by WhatsApp
29              
30             __END__