saintmike has asked for the wisdom of the Perl Monks concerning the following question:
Alas, there seems to be a bug with it. If you call the script above from another script via exec and close STDIN, as in#!/usr/bin/perl #sloader use SelfLoader; foobar(); __DATA__ sub foobar { print "foobar!\n"; }
it fails:#!/usr/bin/perl #sloader-exec close(STDIN); exec "./sloader";
main doesn't contain an __DATA__ token at ./sloader line 5Anyone seen this before?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SelfLoader chokes on closed STDIN
by liverpole (Monsignor) on Nov 07, 2006 at 00:38 UTC | |
by saintmike (Vicar) on Nov 07, 2006 at 00:41 UTC | |
by liverpole (Monsignor) on Nov 07, 2006 at 00:47 UTC | |
by saintmike (Vicar) on Nov 07, 2006 at 06:20 UTC | |
|
Re: SelfLoader chokes on closed STDIN
by Tanktalus (Canon) on Nov 07, 2006 at 20:42 UTC | |
by saintmike (Vicar) on Nov 08, 2006 at 17:27 UTC |