Subject: | Allow new() to accept an existing PDF::API2 object. |
I would like the ability to intersperse PDF::ReportWriter reports into
the middle of PDF's. The attached replacement for new() allows an
existing PDF::API2 object to be passed in. I subclassed the module
using this new() function. It might be cleaner to modify the
parse_options method.
Subject: | PDF-ReportWriter-new.txt |
sub new {
my ( $class, $options ) = @_;
# Create new object
my $self = {};
bless $self, $class;
# check if PDF::API2 object is passed in
if ($options->{pdf}) {
$self->{pdf} = $options->{pdf};
}
# Initialize object state
$self->parse_options($options);
return $self;
}