This file is indexed.

/usr/share/perl5/PDF/Writer.pm is in libpdf-writer-perl 0.06-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
package PDF::Writer;

use strict;
use warnings;

our $VERSION = '0.06';

our $Backend;

sub import {
    my $class = shift;
    $Backend = shift if @_;
    require "PDF/Writer/$Backend.pm" if $Backend && $Backend eq 'mock';
}

sub new {
    my $class = shift;

    my $backend = $Backend || (
        eval { require PDF::API2; 1 } ? 'pdfapi2' :
        eval { require pdflib_pl; 1 } ? 'pdflib' : undef
    );

    if ($backend) {
        require "PDF/Writer/$backend.pm";
    }
    else {
        die "No supported PDF backends found!";
    }

    $class .= "::$backend";
    return $class->new(@_);
}

1;
__END__

=head1 NAME

PDF::Writer - PDF writer abstraction layer

=head1 VERSION

This document describes version 0.05 of PDF::Writer, released Oct 25,
2005.

=head1 SYNOPSIS

  use PDF::Writer;

  # Or, to explicitly specify a back-end ...
  use PDF::Writer 'pdflib';
  use PDF::Writer 'pdfapi2';
  use PDF::Writer 'mock';

  my $writer = PDF::Writer->new;

=head1 DESCRIPTION

This is a generalized API that allows a module that generates PDFs to
transparently target multiple backends without changing its code. The
currently supported backends are:

=over 4

=item * PDF::API2

Available from CPAN

=item * PDFlib (versions 3+)

Available from L<http;//www.pdflib.com>. There is both a pay and free version.
PDF::Writer will work with both, within their limitations. Please see the
appropriate documentation for details.

=item * Mock

This allows modules that target PDF::Writer to write their tests against a
mock interface. Please see L<PDF::Writer::mock> for more information.

=back

If both PDF::API2 and pdflib_pl are available, PDF::API2 is preferred. If
neither is available, a run-time exception will be thrown. You must explicitly
load the PDF::Writer::mock driver, if you wish to use it.

=head1 METHODS

=over 4

=item * B<new()>

This acts as a factory, loading the appropriate PDF::Writer driver.

=back

=head1 CODE COVERAGE

We use L<Devel::Cover> to test the code coverage of our tests. Below is the
L<Devel::Cover> report on this module's test suite.

=head1 AUTHORS

Originally written by:

Autrijus Tang E<lt>autrijus@autrijus.orgE<gt>

Currently maintained by:

Rob Kinyon E<lt>rob.kinyon@iinteractive.comE<gt>

Stevan Little E<lt>stevan.little@iinteractive.comE<gt>

Thanks to Infinity Interactive for generously donating our time.

=head1 COPYRIGHT

Copyright 2004, 2005 by Autrijus Tang E<lt>autrijus@autrijus.orgE<gt>.

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

See L<http://www.perl.com/perl/misc/Artistic.html>

=cut