看板 Perl 關於我們 聯絡資訊
code越寫越肥.. 想開始學模組寫法 參考了下面網頁的寫法 http://pydoing.blogspot.tw/2013/01/Perl-Module.html 不過每次使用函式都蠻麻煩 要寫一長串.. 例如上面教學的例子 Demo::print_newline(); Demo::print_something(Demo::return_something("There is no spoon.")); 有沒有辦法只要call函式就好 例如上面例子只要呼叫print_newline()即可 不用每次都多打"Demo::" 煩請解惑~ 感謝!! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.116.20.82
scwg: perldoc Exporter 07/24 02:27
flu:同上,或找個常用或短小的非OO module看src, 像是URI::Escape 07/25 00:28
flu:perlfaq7 也是個好開始 07/25 00:28