-
-
21 Oct 2020 00:05:42 UTC
- Distribution: Filename-Image
- Module version: 0.005
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues (0)
- Testers (1174 / 0 / 2)
- Kwalitee
Bus factor: 1- % Coverage
- License: perl_5
- Perl: v5.10.1
- Activity
24 month- Tools
- Download (15.02KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- NAME
- VERSION
- SYNOPSIS
- DESCRIPTION
- FUNCTIONS
- HOMEPAGE
- SOURCE
- BUGS
- SEE ALSO
- AUTHOR
- COPYRIGHT AND LICENSE
NAME
Filename::Image - Check whether filename indicates being an image
VERSION
This document describes version 0.005 of Filename::Image (from Perl distribution Filename-Image), released on 2020-10-20.
SYNOPSIS
use Filename::Image qw(check_image_filename); my $res = check_image_filename(filename => "foo.jpg"); if ($res) { printf "File is image"; } else { print "File is not image\n"; }
DESCRIPTION
FUNCTIONS
check_image_filename
Usage:
check_image_filename(%args) -> bool|hash
Check whether filename indicates being an image.
Examples:
Example #1:
check_image_filename(filename => "foo.txt"); # -> 0
Example #2:
check_image_filename(filename => "foo.mp4"); # -> 0
Example #3:
check_image_filename(filename => "foo.jpg"); # -> {}
Example #4:
check_image_filename(filename => "foo.PNG"); # -> {}
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.
HOMEPAGE
Please visit the project's homepage at https://metacpan.org/release/Filename-Image.
SOURCE
Source repository is at https://github.com/perlancar/perl-Filename-Image.
BUGS
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Filename-Image
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.
SEE ALSO
AUTHOR
perlancar <perlancar@cpan.org>
COPYRIGHT AND LICENSE
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.
Module Install Instructions
To install Filename::Image, copy and paste the appropriate command in to your terminal.
cpanm Filename::Image
perl -MCPAN -e shell install Filename::Image
For more information on module installation, please visit the detailed CPAN module installation guide.