Thread Package Deklaration in Datei
(4 answers)
Opened by rosti at 2015-02-14 10:08 2015-02-14T09:26:26 GwenDragon Das gänge dann mit eval: Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 use strict; use warnings; use 5.010; my $data = do{local $/ = undef; <DATA>}; $data = sprintf $data, 'Foo'; eval "$data"; Foo::foo(); __DATA__ package %s; sub foo{ say "foo" } sub bar{ say "bar" } |