I'm not sure what POE::Component::Logger wants, but I suspect that it's a configuration file on it's own; in that case, it's a bit difficult just to point it at the calling script, since I don't think you can easily tell it to "open this file, but only start from after '__END__'".
However, you could create a temporary file from a "here" document:
open TEMPFILE, ">$temp_filename";
print << END_OF_HEREFILE
....
...
write your config file stuff here
....
...
END_OF_HEREFILE
close TEMPFILE;
POE::Component::Logger->spawn(ConfigFile => $temp_filename);
...
unlink ($temp_filename);
Remember you need to add in the unlink somewhere to delete the tempfile; you need to decide where it should go depending on your code.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.