Dabei die Abhängigkeit vom Modul IO::Wrap beseitigt.
{ name => "DBD::Pg", version => '1.49', url => "http://search.cpan.org/~dbdpg/" },
{ name => "Email::Address", url => "http://search.cpan.org/~rjbs/" },
{ name => "FCGI", url => "http://search.cpan.org/~mstrout/" },
- { name => "IO::Wrap", version => '2.110', url => "http://search.cpan.org/~dskoll/" },
{ name => "List::MoreUtils", version => '0.21', url => "http://search.cpan.org/~vparseval/" },
{ name => "PDF::API2", version => '2.000', url => "http://search.cpan.org/~areibens/" },
{ name => "Template", version => '2.18', url => "http://search.cpan.org/~abw/" },
package SL::ReportGenerator;
use Data::Dumper;
-use IO::Wrap;
use List::Util qw(max);
use Text::CSV_XS;
#use PDF::API2; # these two eat up to .75s on startup. only load them if we actually need them
}
sub unescape_string {
- my $self = shift;
- my $text = shift;
+ my ($self, $text, $do_iconv) = @_;
- $text = $main::locale->unquote_special_chars('HTML', $text);
- $text = $::locale->{iconv}->convert($text);
+ $text = $main::locale->unquote_special_chars('HTML', $text);
+ $text = $::locale->{iconv}->convert($text) if $do_iconv;
return $text;
}
'quote_char' => $quote_char,
'eol' => $eol, });
- my $stdout = wraphandle(\*STDOUT);
my @visible_columns = $self->get_visible_columns('CSV');
+ my $stdout;
+ open $stdout, '>-';
+ binmode $stdout, ':encoding(utf8)' if $::locale->is_utf8;
+
if ($opts->{headers}) {
if (!$self->{custom_headers}) {
- $csv->print($stdout, [ map { $self->unescape_string($self->{columns}->{$_}->{text}) } @visible_columns ]);
+ $csv->print($stdout, [ map { $self->unescape_string($self->{columns}->{$_}->{text}, 1) } @visible_columns ]);
} else {
foreach my $row (@{ $self->{custom_headers} }) {
@item
Email::Address
@item
-IO::Wrap (aus dem Paket IO::Stringy)
-@item
List::MoreUtils
@item
PDF::API2
* Email::Address
- * IO::Wrap (aus dem Paket IO::Stringy)
-
* List::MoreUtils
* PDF::API2
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
- span.roman { font-family:serif; font-weight:normal; }
- span.sansserif { font-family:sans-serif; font-weight:normal; }
+ span.roman { font-family:serif; font-weight:normal; }
+ span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<li>DBI
<li>DBD::Pg
<li>Email::Address
-<li>IO::Wrap (aus dem Paket IO::Stringy)
<li>List::MoreUtils
<li>PDF::API2
<li>Template
neu hinzugekommen:
- Achive::Zip
-- IO::Wrap (aus dem Paket "IO::Stringy")
- Template
- Text::CSV_XS
- Text::Iconv