饶琛琳 > NG-0.001 > NG

Download:
NG/NG-0.001.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.001   Source   Latest Release: NG-0.001_05

NAME ^

NG - Newbie::Gift or Next::Generation?? hoho~

DESCRIPTION ^

Newbie::Gift is a repo lanched by Achilles Xu. He wants to write a sub-language which exports useful keywords as many as possible, has a simple Object-oriented syntax as php4 or java-0.1, and uses callback replace return values as nodejs.

Idea comes because Steven Little's Moe.

Before Achilles implement all the base object and syntax one day in the future, I just try to write this module for only exporting some keywords useful to myself.

Maybe some day Achilles will give us a brand-new and beautiful syntax, maybe lisp-like.

Everyone interested click please: https://github.com/PerlChina/Newbie-Gift.

SYNOPSIS ^

Though I like Function::Parameters very much, but sub features maybe re-implemented by Achilles, so I donot import them. By now, there are only few keywords export:

local_run

Capsulate IPC::Open3 for STDOUT/STDERR, no more exec/system, idea from Rex.

remote_run

TODO

taskset
web_get

Capsulate AnyEvent::HTTP and HTML::TreeBuilder, idea from Mojo::UserAgent and Mojo::DOM.

mail_send
mail_get

Capsulate Net::POP3 and Email::MIME and Encode, return headers and body respectively. Just like action of <web_get>.

from_json

Load JSON file to be a NG object(<Array> or <Hashtable>).

from_yaml

Load YAML file to be a NG object(<Array> or <Hashtable>).

mkdir_p
rm_r
cp_r
read_file

Capsulate open and while, use callback for each line.

read_dir

Capsulate glob and File::Find, use callback for find, while return value for glob.

file_stat

No one want calculate file mode and ctime/mtime/atime anymore. I implement a <Time> object and file_stat will return such object.

process_log

Capsulate split for log process, use callback for each line and each field.

geo_ip

use Geo::IP or match ip from a YAML-like ipaddr database by yourself.

db

Capsulate DBI CRUD operator, idea from Dancer::Plugin::Database::Handle. But use SQL::Abstract for %options.

parse_excel

OBJECT ^

Now we implment few ojbect base on <Object> as follow:

<Array>, <Hashtable>, <SHashtable>, <Time>, <HTTP::DOM>, <Excel>

AUTHOR ^

Chenryn <rao.chenlin@gmail.com> Achilles <formalin14@gmail.com> Terrence <hanliang1990@gmail.com>

COPYRIGHT & LICENSE ^

Copyright 2009-2012 chenryn, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.14 itself.

syntax highlighting: