Re: [Shellweb-main] Re: [Shellweb-main] =?GB2312?B?zsS8/r3hubk=?=
Status: Alpha
Brought to you by:
alexe_cn
|
From: fayland <fa...@gm...> - 2005-12-28 05:55:44
|
yes, 同感。
OO 将很容易将功能拆分。
Anthony WU wrote:
> 我比建使用 OO 的法
> 例如
> ShellWeb/socket.pm
> ShellWeb/socket/ssl.pm
> ShellWeb/html.pm
> ShellWeb/html/css.pm
> ShellWeb/layout.pm
> ShellWeb/layout/link.pm
> ShellWeb/layout/image.pm
>
> 使用
> ====
> my $imageout = new ShellWeb::layout::image ('
> http://aaa.aaa.com/aaa.jpeg') <http://aaa.aaa.com/aaa.jpeg%27%29>;
> ====
> package ShellWeb::layout::image
> sub new
> {
> my $get = new ShellWeb::socket (.....);
> }
>
>
> 的方法,做修改及外加、用比方便
>
>
> 2005/12/28, fayland <fa...@gm... <mailto:fa...@gm...>>:
>
> 我认为我们还是以模块的形式组织文件结构比较好。
> 我的建议是:
> lib/ShellWeb.pm
> lib/ShellWeb/xxx.pm
> 这样可以将其打包给 CPAN
> 而运行的话可以考虑 shellweb.pl 这么写:
>
> #!/usr/bin/perl
>
> use strict;
> use ShellWeb;
>
> ShellWeb->run(param => '1'); # 参数
>
> 1;
>
> 而目前这种 file_queue.pm 比较 ugly.
> 如果诸位认同我的意见的话,我可以用 module-starter 来建立这个结构。
>
> --
> Fayland Lam // http://www.fayland.org/
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through
> log files
> for problems? Stop! Download the new AJAX search engine that makes
> searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> <http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click>
>
>
--
Fayland Lam // http://www.fayland.org/
|