第 6 章 Perl Module


目录

6.1. Module::Build 6.2. ExtUtils::MakeMaker 6.3. Test::Simple 6.4. Test::More 6.5. XML::Simple 6.6. LWP::Simple 6.7. Date::Manip 6.8. Parameter
6.8.1. Getopt::Std 6.8.2. Getopt::Long
6.9. Encode/Decode
6.9.1. Text::Iconv 6.9.2. Encode::Guess -- Guesses encoding from data 6.9.3. URI::Escape
6.10. Net::SSH::Expect 6.11. UDPM - Perl extension for User Dialogs 6.12. Curses::UI 6.13. WWW::Mechanize

How do I install XML::Simple?

On Unix systems, try:

 perl -MCPAN -e 'install XML::Simple'
	

If that doesn't work, download the latest distribution from ftp://ftp.cpan.org/pub/CPAN/authors/id/G/GR/GRANTM , unpack it and run these commands:

perl Makefile.PL
make
make test
make install
	

On Win32, if you have a recent build of ActiveState Perl (618 or better) try this command:

ppm install XML::Simple
	

6.1. Module::Build

过程 6.1. Module::Build step by setp

  1. Build.PL

    $ cat Build.PL
    use Module::Build;
    
    Module::Build->new
    (	module_name => 'My::Module',
    	license => 'perl',
        dist_version => '1.0',
    )->create_build_script;
    				
  2. perl Build.PL

    $ perl Build.PL
    Checking prerequisites...
    Looks good
    
    Creating new 'Build' script for 'My-Module' version '1.0'
    				
  3. Build

    $ ./Build
    Copying lib/My/Module.pm -> blib/lib/My/Module.pm
    				
  4. Build test

    $ ./Build test
    t/hello....ok
    All tests successful.
    Files=1, Tests=1,  0 wallclock secs ( 0.02 cusr +  0.01 csys =  0.03 CPU)
    				

    --test_files

    $ ./Build test --test_files t/hello.t
    




原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值