さようなら、ActivePerl。こんにちは、StrawberryPerl。

WindowsでPerlというと、ActivePerlしか知らなかったのですが、今日、もう一つのPerlを知りました。

それが、StrawberryPerlです。

「perl -V」した結果は続きのほうに書いておきます。

「Win32 Perl Wiki」によれば、Cコンパイラも一緒についているので、CPANが余裕で使えるとのこと。

それを知った瞬間に乗換確定でした。

If you are already experienced with Perl on Unix and it’s just Windows you aren’t comfortable with, then you are almost certainly going to want to use Strawberry Perl which is the closest thing you will find to Perl on Unix, and is being used on a daily basis by a number of major CPAN authors and Perl personalities when they need to work on Windows. Strawberry Perl also installs a C compiler and make (software build tools), so you can download and build all 10,000 of the latest and greatest modules from the CPAN
Main Page - Win32 Perl Wiki

勝手にpathが通ってしまうので、コマンドラインからcpanすれば、すぐに使えます。

スタートメニューにも「CPAN Client」ができるので、そちらからも使えます。

あれだけ苦労したのは何なのかと思うほどですが、好きな場所にインストールできないのは少し残念です。

今まではスクリプトの1行目は「#!/usr/bin/perl」でよかったのですが、「#!perl」に変更する必要がありました。

まあ、それでもCPANが普通に使えるというのは、変えがたい魅力です。

…と書いたところで、ふと思いついて「AN HTTPD」のPerlへのパスをショートネームで入れなおしてみたところ、この問題も無事解決できました。

1
C:\strawb~1\perl\bin\perl.exe

「#!の行を調べる」のチェックは、忘れずにはずしておきましょう。

これで、心置きなく乗換ができますね。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
Platform:
osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags =' -s -O2 -DWIN32 -DHAVE_DES_FCRYPT  -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX',
optimize='-s -O2',
cppflags='-DWIN32'
ccversion='', gccversion='3.4.5', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long long', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='g++', ldflags ='-s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib"'
libpth=C:\strawberry\c\lib
libs= -lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32
perllibs= -lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32
libc=-lmsvcrt, so=dll, useshrplib=true, libperl=libperl510.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\strawberry\c\lib"'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS
USE_LARGE_FILES USE_PERLIO
Built under MSWin32
Compiled at Oct 19 2008 15:47:04
@INC:
C:/strawberry/perl/lib
C:/strawberry/perl/site/lib
.
comments powered by Disqus
Hugo で構築されています。
テーマ StackJimmy によって設計されています。