/usr/share/perl5/PDF/Writer/mock.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 | package PDF::Writer::mock;
use strict;
use warnings;
our $VERSION = '0.03';
our @mock;
my @methods = qw(
open close save
begin_page end_page
open_image close_image
image_height image_width place_image
save_state restore_state
font font_size find_font
show_boxed show_xy
circle rect
color
move
linewidth line
fill stroke fill_stroke
stringify
parameter info
add_weblink add_bookmark
);
my $x;
sub new {
return bless \$x, shift;
}
foreach my $method (@methods) {
no strict 'refs';
*$method = sub {
my $self = shift;
push @mock, [ $method, @_ ];
return 1;
};
}
sub mock_reset { @mock = (); }
sub mock_retrieve { @mock }
1;
__END__
|