in reply to Spreadsheet::WriteExcel under mod_perl 2

Why don't you simply print to STDOUT? That does the right thing under both versions of mod_perl.

UPDATE: I didn't realize you need to pass a filehandle to Spreadsheet::WriteExcel. I think you could still pass STDOUT though. However, I noticed some problems in your code. For one thing, $ENV{MOD_PERL} is defined under mod_perl 1.x as well. See this for more info.

  • Comment on Re: Spreadsheet::WriteExcel under mod_perl 2

Replies are listed 'Best First'.
Re2: Spreadsheet::WriteExcel under mod_perl 2
by dragonchild (Archbishop) on Nov 21, 2003 at 14:02 UTC
    Can I just do this, then?
    sub output { my $self = shift; binmode STDOUT; $self->write_file(\*STDOUT); }

    In other words, will that work for the three situations I've outlined? (Are there others??)

    ------
    We are the carpenters and bricklayers of the Information Age.

    The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6

    ... strings and arrays will suffice. As they are easily available as native data types in any sane language, ... - blokhead, speaking on evolutionary algorithms

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.

      It seems like it ought to work to me. Try it.