PCB论坛网

 找回密码
 注册
查看: 18453|回复: 91

genesis 運行perl scripts?

[复制链接]
头像被屏蔽
发表于 2004-6-17 15:06:22 | 显示全部楼层 |阅读模式
提示: 该帖被管理员或版主屏蔽
回复

使用道具 举报

发表于 2004-6-17 20:03:13 | 显示全部楼层

i dont't understand

回复 支持 反对

使用道具 举报

发表于 2004-6-17 23:13:53 | 显示全部楼层
以下是引用justwin在2004-6-17 15:06:22的发言:

請問:如何在genesis中運行perl的scripts?

要如何設定和執行?

Genesis now supports Perl scripts =================================

How to enable Perl scripts under Genesis ========================================

The following steps are needed to enable Perl scripts under Genesis:

1. Obtain Perl 2. Install Perl 3. Install the Perl files enabling sockets 4. Change /etc/services 5. Inspect the files in /genesis/eNN/all/perl 6. Install Genesis.pm 7. Read rules regarding Perl scripts 8. Run the example script 9. Debugging 10. Remote debugging

[em06]

1.上CPAN下載最新版本perl 版本為5.8.3

2.安裝perl, 在unix下perl Makefile.PL然後 make make test

make install

在windows建議用 ActivePerl較簡單安裝

3.建議裝perl/tk,用此來作漂亮且多功能的GUI

4.確認Genesis.pm存在於genesis目錄

5.開始寫程式囉.........

記得程式前面加上

#!/sw/bin/perl

use Genesis;

use Tk;#若你有裝perl/tk

...........剩下的看你的造化.........加油吧!

[em01][em01]
[此贴子已经被作者于2004-6-20 9:30:24编辑过]
回复 支持 反对

使用道具 举报

 楼主| 发表于 2004-6-23 12:24:14 | 显示全部楼层

執行時,產生警告訊息:

Script C:/valor/klt.pl ended with error:

Execution of C:/valor/klt.pl aborted due to compilation errors.

請教前輩們,要如何順利執行呢?

是在GENESIS-SCRIPTS功能中執行嗎?

回复 支持 反对

使用道具 举报

 楼主| 发表于 2004-6-23 12:57:29 | 显示全部楼层

在dos環境下執行的結果:

C:\valor>perl -cw klt.pl "use" may clash with future reserved word at klt.pl line 4. syntax error in file klt.pl at line 4, next 2 tokens "use Genesis" klt.pl had compilation errors.

要如何順利在genesis-scripts功能中,順利執行呢?

[em06][em06]
回复 支持 反对

使用道具 举报

发表于 2004-6-23 23:58:42 | 显示全部楼层

試試這個,執行完後把結果post上來

#Asics Lui perl scripts for check install item.

#!/usr/bin/perl use strict; use ExtUtils::Installed;

my $inst= ExtUtils::Installed->new(); my @modules = $inst->modules();

foreach(@modules) { my $ver = $inst->version($_) || "???"; printf("%-12s -- %s\n", $_, $ver); } exit 0;

回复 支持 反对

使用道具 举报

 楼主| 发表于 2004-6-24 09:32:37 | 显示全部楼层

執行結果是:

gen_csh-10004-Script exited Script C:/valor/sys/scripts/PERLINTEST.pl ended with error:

Badly placed ()'s.

請教在genesis中可以debug perl程式嗎?

回复 支持 反对

使用道具 举报

发表于 2004-6-24 12:36:04 | 显示全部楼层
以下是引用justwin在2004-6-24 9:32:37的发言:

執行結果是:

gen_csh-10004-Script exited Script C:/valor/sys/scripts/PERLINTEST.pl ended with error:

Badly placed ()'s.

請教在genesis中可以debug perl程式嗎?

結果輸出應該類似:

ActivePerl:ocTools -- 0.04 ActiveState::RelocateTree -- 0.03 Archive::Tar -- 0.072 Archive::Zip -- 0.11 CPANPLUS -- 0.049 Compress::Zlib -- 1.16 DBD::ODBC -- 1.07 DBD::mysql -- 2.9002 DBI -- 1.34 Data:ump -- 0.04 Digest::HMAC -- 1.01 Digest::MD2 -- 2.00 Digest::MD4 -- 1.1 Digest::SHA1 -- 2.01 ExtUtils::AutoInstall -- 0.56 File::CounterFile -- 0.12 Font::AFM -- 1.18 HTML-Tree -- ??? HTML:arser -- 3.26 HTML::Tagset -- 3.03 IPC::Run -- 0.78 MD5 -- 2.02 PPM3 -- ??? Perl -- 5.8.0 SOAP:ite -- 0.55 Sort::Versions -- 1.5 Test::Reporter -- 1.20 Text::Autoformat -- 1.04 Tk -- 800.024 URI -- 1.19 Unicode::String -- 2.06 Win32 -- 0.20 Win32::AuthenticateUser -- 0.02 XML:arser -- 2.31 XML::Simple -- 1.06 YAML -- 0.35 libwww-perl -- ???

至於debug建議在終端下看較好

可以加上use diagnostics;又叫長舌婦功能.......會很詳細的告訴你的語法哪裡錯了,並舉例給你看...............

回复 支持 反对

使用道具 举报

 楼主| 发表于 2004-6-24 13:37:46 | 显示全部楼层
我的問題,好像是無法讓genesis找到或是執行perl.exe的主程式.因為執行scripts功能時產生 use:command not found.訊息.    [em06][em11]
回复 支持 反对

使用道具 举报

发表于 2004-6-24 17:10:19 | 显示全部楼层

鍵入perl -v

秀給我看你的版本

建議重裝perl

若有需要我寄給你......請註明你要哪個系統的....例如w2k.linux或hpux.........

還有genesis目錄內是否有genesis.pm這個檔案呢?

若有請copy到/perl/lib

可在終端下試著執行

perl

use Genesis.pm; 按enter後若無問題即表示能在genesis執行.........

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|手机版|PCB设计论坛|EDA论坛|PCB论坛网 ( 沪ICP备05006956号-1 )

GMT+8, 2024-5-15 07:30 , Processed in 0.176806 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表