MVC::Neaf::Util - Some static functions for Not Even A Framework
This is utility class. Nothing to see here unless one intends to work on MVC::Neaf itself.
This module optionally exports anything it has.
Convert '////fooo//bar/' to '/foo/bar' and '//////' to either '' or '/'.
extra_missing( \%input, \%allowed, \@required )
Dies if %input doesn't pass validation. Only definedness is checked.
Return a date in format required by HTTP standard for cookies and cache expiration.
Expires=Wed, 13 Jan 2021 22:23:01 GMT;
maybe_list( $value, @defaults )
If $value is undef, return a copy of \@defaults.
$value
undef
If $value is a list, return a copy of it.
Otherwise, return [ $value ].
[ $value ]
List ('', '/foo', '/foo/bar') for '/foo/bar'
Convert string or regex to an anchored regex.
Run all subroutines in array. Exceptions not handled. Return nothing.
Run all subroutines in array, even if some die.
Execute on_error in such cases.
Return number of failed callbacks.
Because JSON::MaybeXS is not available on all systems, try to load it or emulate it.
These two are reexported from whatever JSON module we were lucky enough to load.
This module is part of MVC::Neaf suite.
Copyright 2016-2018 Konstantin S. Uvarin khedin@cpan.org.
khedin@cpan.org
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install MVC::Neaf, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MVC::Neaf
CPAN shell
perl -MCPAN -e shell install MVC::Neaf
For more information on module installation, please visit the detailed CPAN module installation guide.