Shinnara's Blog
Talking with Shinnara :: NaraTalk.com

'RecDescent'에 해당되는 글 1건

  1. 2008/12/01 CPAN 모듈 검색 및 설치하기

 앞서 몇개의 포스팅을 통해 C 파일을 분석하기 위한 작업을 하고 있다고 말씀드렸는데,  aero 님께서 유용한 정보를 주셔서 해당 모듈을 설치하고 테스트 해보기로 했습니다. 유용한 정보는 이전 글에서 확인하실 수 있습니다.

 알려주신 정보가 무척이나 도움이 될 것임을 알겠는데, 문제는 CPAN 모듈을 한번도 설치해본 적이 없다는 것입니다. Perl을 제대로 사용해본적도 없거니와, CPAN은 이번에 알게되었으니 말이죠. Windows에 Perl을 설치하는 과정도 시행착오(?)를 여러번 거듭했죠. ActivePerl을 깔았다가 camelBox를 깔고, 그러다가 다시 Strawberry를 깔고하는 식의 삽질(?)을 했답니다. 지금은 딸기가 깔려있고 딸기에 있는 CPAN Client를 이용해서 해당 모듈을 설치하려고 합니다.

CPAN Client를 실행하니 CPAN shell이 뜨더군요. help 를 쳐보니 어쩌구 저쩌구.. 하지만 뭘 알겠습니까.. 초보가..그래서 구글링을 해서 얻은 자료입니다.

펄(Perl)의 CPAN 모듈 사용하기

간단히 요약하자면,

i 명령을 통해 해당 모듈의 정보를 검색해 볼 수 있고,
install 명령을 통해 설치할 수 있다.


입니다.

aero 님이 알려주신 Parse::RecDescent 모듈을 검색하려면

cpan> i Parse::RecDescent


해당 모듈을 설치하려면

cpan> install Parse::RecDescent


하면 된답니다.

install 명령을 실행하면 다음과 같은 메시지가 표시됩니다.


cpan> install Parse::RecDescent
Running install for module 'Parse::RecDescent'
Running make for D/DC/DCONWAY/Parse-RecDescent-1.94.tar.gz
Fetching with LWP:
  http://cpan.strawberryperl.com/authors/id/D/DC/DCONWAY/Parse-RecDescent-1.94.t
ar.gz
Checksum for C:\strawberry\cpan\sources\authors\id\D\DC\DCONWAY\Parse-RecDescent
-1.94.tar.gz ok
Scanning cache C:\strawberry\cpan\build for sizes
DONE

  CPAN.pm: Going to build D/DC/DCONWAY/Parse-RecDescent-1.94.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for Parse::RecDescent
cp lib/Parse/RecDescent.pm blib\lib\Parse\RecDescent.pm
cp lib/Parse/RecDescent.pod blib\lib\Parse\RecDescent.pod
  DCONWAY/Parse-RecDescent-1.94.tar.gz
  C:\strawberry\c\bin\dmake.EXE -- OK
Running make test
C:\strawberry\perl\bin\perl.exe "-Iblib\lib" "-Iblib\arch" test.pl
1..18
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
ok 7
ok 8
ok 9
ok 10
ok 11
ok 12
ok 13
ok 14
ok 15
ok 16
ok 17
ok 18
  DCONWAY/Parse-RecDescent-1.94.tar.gz
  C:\strawberry\c\bin\dmake.EXE test -- OK
Running make install
Prepending C:\strawberry\cpan\build\Parse-RecDescent-1.94-1Qhpm6/blib/arch C:\st
rawberry\cpan\build\Parse-RecDescent-1.94-1Qhpm6/blib/lib to PERL5LIB for 'insta
ll'
Installing C:\strawberry\perl\site\lib\Parse\RecDescent.pm
Installing C:\strawberry\perl\site\lib\Parse\RecDescent.pod
Writing C:\strawberry\perl\site\lib\auto\Parse\RecDescent\.packlist
Appending installation info to C:\strawberry\perl\lib/perllocal.pod
  DCONWAY/Parse-RecDescent-1.94.tar.gz
  C:\strawberry\c\bin\dmake.EXE install UNINST=1 -- OK


cpan>

로그를 보니 설치가 잘 된것 같군요. 이제 이 모듈을 이용해서 C 코드를 파싱해보는 일만 남았네요.

잘 되면 후기(?)를 올려보겠습니다.

좋은 하루 되세요.~



0 Trackback, 0 Comment

TRACKBACK :: http://naratalk.com/trackback/268 관련글 쓰기

댓글을 달아 주세요

1 
다...... (264)
Computer/Programming (106)
Links (14)
책 읽는 즐거움 (7)
끄적임 (66)
즐거운 과학 나라 (7)
일본 (5)
Study (4)