Padre安装

来源:互联网 发布:网络最火的手机铃声 编辑:程序博客网 时间:2024/04/29 10:31
最近在学习Perl,得知Padre是一个相当不错的Perl的IDE,所以打算安装一个玩玩。在安装的过程中,走了不少弯路,也接触了一些新的东东,记录之以备忘。基本配置:Debian Sid,Windows XP(已经安装了ActivePerl-5.8.9)Padre的老巢:http://padre.perlide.org第二个窝:http://search.cpan.org/dist/Padre/安装总结:Debian下:稳定版本:$ apt-get install padre开发版本:cpan> install PadreWindows下:稳定版本:安装strawberry-plus-padre-0.56.msi,参考步骤"3".开发版本:安装了strawberry-plus-padre-0.56.msi后,进行步骤"-1"即可.从源码安装padre:$ svn co http://svn.perlide.org/padre/trunk padre$ cd padre/Padre$ C:/strawberry/perl/bin/perl Makefile.PL $ C:/strawberry/c/bin/dmake$ C:/strawberry/c/bin/dmake test$ C:/strawberry/perl/bin/perl dev.pl曲折的安装全过程:1. 从cpan下载最新的源代码(在接触的短短几个星期,出了好几个版本,目前为0.59),后来发现除了看代码外,和安装毫无关系2. 在Debian下先体验一把:apt-get install padre, 结果发现安装的是0.41的版本 ):3. 下载包含了strawberry的windows版本:http://padre-perl-ide.googlecode.com/files /strawberry-plus-padre-0.56.msi,安装后就可以使用了4. Windows的是0.56版本的,也算是比较新了,但是因为打算了解下它的实现,还是最新的好一点,所以考虑到既然都放到cpan上了,也就应该可以通过cpan安装。5. 安装WxPerl:在cpan的提示符下安装: cpan> install Wx,将会装上一大堆东东,不过最终一切OK。用如下代码可以测试之:_________________________________________________________________| #!/usr/bin/perl -w|| use strict;|| use Wx;|| package MyApp;|| #use base 'Wx::App';| our @ISA = qw(Wx::App);|| sub OnInit {| my $frame = MyFrame->new("hello boy");| $frame->Show( 1 );| }|| package MyFrame;|| our @ISA = qw(Wx::Frame);|| sub new {| my $class = shift;| my $this = $class->SUPER::new(undef, -1, $_[0]);|| return $this;| }|| package main;|| my $app = MyApp->new;| $app->MainLoop;|________________________________________________________________6. 从cpan安装Padre:cpan> install Padre, Debian下顺利搞定,而Windows下因为某个包无法下载而失败 ):7. Win下升级cpan: cpan> install CPAN, 继续失败8. 继续升级cpan:cpan> install Bundle::CPAN, 继续失败..9. 在strawberry下面升级: cpan> install Padre, 失败...-1. 最后,还是Padre的文档有用:http://padre.perlide.org/trac/wiki/Downloada) perl -MPAR::Dist -e"install_par(q(http://www.strawberryperl.com/download/padre/Alien-wxWidgets-0.46-MSWin32-x86-multi-thread-5.10.1.par))"b) perl -MPAR::Dist -e"install_par(q(http://www.strawberryperl.com/download/padre/Wx-0.94-MSWin32-x86-multi-thread-5.10.1.par))"c) cpan> install Padre搞定!!