Filename::Video - Check whether filename indicates being a video file
This document describes version 0.004 of Filename::Video (from Perl distribution Filename-Video), released on 2020-10-20.
use Filename::Video qw(check_video_filename); my $res = check_video_filename(filename => "foo.mp3"); if ($res) { printf "File is video"; } else { print "File is not video\n"; }
Usage:
check_video_filename(%args) -> bool|hash
Check whether filename indicates being a video file.
Examples:
Example #1:
check_video_filename(filename => "foo.txt"); # -> 0
Example #2:
check_video_filename(filename => "foo.DOC"); # -> 0
Example #3:
check_video_filename(filename => "foo.webm"); # -> {}
Example #4:
check_video_filename(filename => "foo.MP4"); # -> {}
This function is not exported by default, but exportable.
Arguments ('*' denotes required arguments):
filename* => filename
Return value: (bool|hash)
Return false if no archive suffixes detected. Otherwise return a hash of information.
Please visit the project's homepage at https://metacpan.org/release/Filename-Video.
Source repository is at https://github.com/perlancar/perl-Filename-Video.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Filename-Video
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Filename::Audio
Filename::Image
Filename::Ebook
Filename::Media
perlancar <perlancar@cpan.org>
This software is copyright (c) 2020, 2017 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Filename::Video, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Filename::Video
CPAN shell
perl -MCPAN -e shell install Filename::Video
For more information on module installation, please visit the detailed CPAN module installation guide.