Thread eine 'sub'-Methode aus andere .plx zu benutzen ? (7 answers)
Opened by Updecrator at 2006-01-10 13:13

ptk
 2006-01-10 21:43
#61619 #61619
User since
2003-11-28
3645 Artikel
ModeratorIn
[default_avatar]
Du möchtest also ein Script, das gleichzeitig ein Modul ist? Ich benutze dazu immer:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
package Module;
sub A { ... }
sub B { ... }
sub C { ... }
return 1 if caller(); # hier endet der Modul-Part
# Ab hier wird alles nur ausgeführt, wenn die Datei als Skript gestartet wird.
require Getopt::Long;
Getopt::Long::GetIOptions(...) or die "usage...";
A();
...

View full thread eine 'sub'-Methode aus andere .plx zu benutzen ?