NAME
MToken::Util - Exported utility functions
VERSION
Version 1.03
SYNOPSIS
use MToken::Util;
DESCRIPTION
Exported utility functions
- cleanServerName
-
my $servername = cleanServerName( "my.server.com" );
Clening the specified ServerName value
- cleanFileName
-
my $filename = cleanServerName( "mtoken.12345678" );
Clening the specified FileName value
- explain
-
print explain( $object );
Returns Data::Dumper dump
- md5sum
-
my $md5 = md5sum( $file );
See Digest::MD5
- sha1sum
-
my $sha1 = sha1sum( $file );
See Digest::SHA1
- filesize
-
my $fsize = filesize( $file );
Returns file size
- hide_pasword
-
print hide_pasword('http://user:password@example.com'); # 'http://user:*****@example.com'
Returns specified URL but without password
- blue, cyan, green, red, yellow, magenta
-
print cyan("Format %s", "text");
Returns colored string
- nope, skip, wow, yep
-
my $status = nope("Format %s", "text");
Prints status message and returns status.
For nope returns - 0; for skip, wow, yep - 1
- parse_credentials
-
my ($user, $password) = parse_credentials( 'http://user:password@example.com' ); my ($user, $password) = parse_credentials( new URI('http://user:password@example.com') );
Returns credentials pair by URL or URI object
- tcd_load
-
if (my $text = tcd_load("/my/file.tcd")) { print $text; # Blah-Blah-Blah } else { or die("Oops"); }
Load text data from TCD04 file
- tcd_save
-
tcd_save("/my/file.tcd", "Blah-Blah-Blah") or die("Oops");
Save text data to TCD04 file
HISTORY
See Changes
file
TO DO
See TODO
file
BUGS
* none noted
SEE ALSO
AUTHOR
Serż Minus (Sergey Lepenkov) http://www.serzik.com <abalama@cpan.org>
COPYRIGHT
Copyright (C) 1998-2021 D&D Corporation. All Rights Reserved
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See LICENSE
file and https://dev.perl.org/licenses/