NAME
Sorauta::Utility - useful sub routeans
SYNOPSIS
use Sorauta::Utility;
1.get_from_http $url = "http://google.com/";
# HTTP::Response instance
my $result = get_from_http($url);
2.save_file my $path = "sample.txt"; my $content = "hoge fuga piyo"; # if error has occures, return 2(or 0) save_file($path, $content);
3.create_get_url my $url = "http://google.com/"; my $params = { id => 1, name => "sample" };
# return "http://google.com/?name=sample&id=1&"
my $result = create_get_url($url, $params);
4.get_timestamp # return "2012/01/25 15:02:14" my $result = get_timestamp(1327471334);
5.get_date # return { year => 1, month => 1, dat => 2, hour => 1, min => 1, sec => 1 }; my $data_obj = get_date();
6.get_epoch_from_formated_http # return 1326498561 my $result = get_epoch_from_formated_http("Fri, 13 Jan 2012 23:49:21 GMT");
7.cat my @path_list = ('/Users', 'user', 'Desktop', 'Hoge.txt');
# return "/Users/user/Desktop/Hoge.txt"
my $result = cat(@path_list);
8.is_hidden_file my $file_path = ".svn";
# return 1
my $result = is_hidden_file($file_path);
9.is_unnecessary_copying_file my $file_path = ".svn";
# return 1
my $result = is_unnecessary_copying_file($file_path);
DESCRIPTION
useful sub routeans
EXPORT
None by default.
SEE ALSO
Mention other useful documentation such as the documentation of related modules or operating system documentation (such as man pages in UNIX), or any relevant external documentation such as RFCs or standards.
If you have a mailing list set up for your module, mention it here.
If you have a web site set up for your module, mention it here.
AUTHOR
Yuki ANAI, <yuki@apple.com>
COPYRIGHT AND LICENSE
Copyright (C) 2012 by Yuki ANAI
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.3 or, at your option, any later version of Perl 5 you may have available.