MToken::Util - Exported utility functions
Version 1.03
use MToken::Util;
Exported utility functions
my $servername = cleanServerName( "my.server.com" );
Clening the specified ServerName value
my $filename = cleanServerName( "mtoken.12345678" );
Clening the specified FileName value
print explain( $object );
Returns Data::Dumper dump
my $md5 = md5sum( $file );
See Digest::MD5
my $sha1 = sha1sum( $file );
See Digest::SHA1
my $fsize = filesize( $file );
Returns file size
print hide_pasword('http://user:password@example.com'); # 'http://user:*****@example.com'
Returns specified URL but without password
print cyan("Format %s", "text");
Returns colored string
my $status = nope("Format %s", "text");
Prints status message and returns status.
For nope returns - 0; for skip, wow, yep - 1
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
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("/my/file.tcd", "Blah-Blah-Blah") or die("Oops");
Save text data to TCD04 file
See Changes file
Changes
See TODO file
TODO
* none noted
Digest::MD5, Digest::SHA1
Serż Minus (Sergey Lepenkov) http://www.serzik.com <abalama@cpan.org>
Copyright (C) 1998-2021 D&D Corporation. All Rights Reserved
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/
LICENSE
To install MToken, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MToken
CPAN shell
perl -MCPAN -e shell install MToken
For more information on module installation, please visit the detailed CPAN module installation guide.