This file is indexed.

/usr/share/perl5/Sys/Info/Helper.pm is in libsys-info-base-perl 0.7804-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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
package Sys::Info::Helper;
use 5.006;
use strict;
use warnings;
use vars qw( $VERSION @EXPORT );
use base qw(Exporter);
use File::Spec::Functions qw( catdir catfile );
use File::Path;
use File::Basename;
use Cwd;
use Carp qw( croak );
use Data::Dumper;
use Text::Template::Simple;

$VERSION = '0.7804';
@EXPORT  = qw( new_driver );

sub new {
    my($class, @args) = @_;
    my $self  = {
        @args % 2 ? () : @args,
    };
    bless $self, $class;
    return $self;
}

sub new_driver {
    my $os   = shift || croak 'OS name?';
    my $you  = shift || 'Your Name';
    my $self = __PACKAGE__->new( os => $os, you => $you );
    my $mb   = catdir qw( lib Sys Info Driver );
    my %file = (
        catfile( $mb, "$os.pm"               ) => $self->_template( 'base'    ),
        catfile( $mb, $os, 'OS.pm'           ) => $self->_template( 'os'      ),
        catfile( $mb, $os, 'Device.pm'       ) => $self->_template( 'device'  ),
        catfile( $mb, $os, 'Device', 'CPU.pm') => $self->_template( 'cpu'     ),
        catfile( qw( t 01-basic.t )          ) => $self->_template( 't'       ),
        'Changes'                              => $self->_template( 'changes' ),
        'README'                               => $self->_template( 'readme'  ),
    );
    $file{MANIFEST} = $self->_manifest( \%file );
    return print Dumper( \%file );
}

sub _write_files {}

sub _manifest {
    my($self, $file) = @_;
    my @list = keys %{ $file };
    return join "\n", map { s{\\}{/}xmsg; $_ } sort @list;
}

sub _template {
    my($self, $target) = @_;
    my $meth = '_template_' . $target;
    croak "$target is not a valid target" if ! $self->can( $meth );
    my $id = $self->{os};
    my $you = $self->{you};
    my $date = localtime time;
    my $year = (localtime time)[5] + 1900;
    my $perlv = $];
    my $tmp = $self->$meth();
    $tmp =~ s{<%ID%>}{$id}xmsg;
    $tmp =~ s{<%DATE%>}{$date}xmsg;
    $tmp =~ s{<%YEAR%>}{$year}xmsg;
    $tmp =~ s{<%PERLV%>}{$perlv}xmsg;
    $tmp =~ s{<%YOU%>}{$you}xmsg;
    return $tmp;
}

sub _template_readme {
    my $self = shift;
    return <<'TEMPLATE';
Sys::Info::Driver::<%ID%>
========================

<%ID%> driver for Sys::Info.

Read the module's POD for documentation.
See the tests for examples.

INSTALLATION

To install this module type the following:

   perl Makefile.PL
   make
   make test
   make install

or under Windows:

   perl Makefile.PL
   nmake
   nmake test
   nmake install

COPYRIGHT

Copyright (c) <%YEAR%> <%YOU%>. All rights reserved.

LICENSE

This library is free software; you can redistribute it and/or modify 
it under the same terms as Perl itself, either Perl version <%PERLV%> or, 
at your option, any later version of Perl 5 you may have available.
TEMPLATE
}

sub _template_changes {
    my $self = shift;
    return <<'TEMPLATE';
Revision history for Perl extension Sys::Info::Driver::<%ID%>.

0.10 <%DATE%>
    => Initial release.

TEMPLATE
}

sub _template_device {
    my $self = shift;
    return <<'TEMPLATE';
package Sys::Info::Driver::<%ID%>::Device;
use strict;
use warnings;
use vars qw( $VERSION );

$VERSION = '0.10';

1;

__END__

=head1 NAME

Sys::Info::Driver::<%ID%>::Device - Base class for <%ID%> device drivers

=head1 SYNOPSIS

    use base qw( Sys::Info::Driver::<%ID%>::Device );

=head1 DESCRIPTION

This document describes version C<0.7804> of C<Sys::Info::Helper>
released on C<21 January 2015>.

Base class for <%ID%> device drivers.

=head1 AUTHOR

Burak Gursoy <burak@cpan.org>.

=head1 COPYRIGHT

Copyright 2006 - 2015 Burak Gursoy. All rights reserved.

=head1 LICENSE

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.16.2 or,
at your option, any later version of Perl 5 you may have available.
=cut

TEMPLATE
}

sub _template_base {
    my $self = shift;
    return <<'TEMPLATE';
package Sys::Info::Driver::<%ID%>;
use strict;
use warnings;
use vars qw( $VERSION );

$VERSION = '0.10';

1;

__END__

=head1 NAME

Sys::Info::Driver::<%ID%> - <%ID%> driver for Sys::Info

=head1 SYNOPSIS

    use Sys::Info::Driver::<%ID%>;

=head1 DESCRIPTION

This is the main module in the C<<%ID%>> driver collection.

=cut
TEMPLATE
}

sub _template_cpu {
    my $self = shift;
    return <<'TEMPLATE';
package Sys::Info::Driver::<%ID%>::Device::CPU;
use strict;
use warnings;
use vars qw($VERSION);
use base qw(Sys::Info::Base);

$VERSION = '0.10';

sub identify { }

sub bitness { }

sub load { }

1;

__END__

=head1 NAME

Sys::Info::Driver::<%ID%>::Device::CPU - <%ID%> CPU Device Driver

=head1 SYNOPSIS

-

=head1 DESCRIPTION

Identifies the CPU.

=head1 METHODS

=head2 identify

See identify in L<Sys::Info::Device::CPU>.

=head2 load

See load in L<Sys::Info::Device::CPU>.

=head2 bitness

See bitness in L<Sys::Info::Device::CPU>.

=head1 SEE ALSO

L<Sys::Info>, L<Sys::Info::Device::CPU>.

=cut
TEMPLATE
}

sub _template_t {
    my $self = shift;
    return <<'TEMPLATE';
#!/usr/bin/env perl
use strict;
use warnings;
use Test::Sys::Info;

driver_ok('<%ID%>');
TEMPLATE
}

sub _template_os {
    my $self = shift;
    return <<'TEMPLATE';
package Sys::Info::Driver::<%ID%>::OS;
use strict;
use warnings;
use vars qw( $VERSION );
use base qw( Sys::Info::Base );

$VERSION = '0.10';

sub init {
    my $self = shift;
    # initialize here, if necessary
    return;
}

sub logon_server {}

sub edition { }

sub tz { }

sub meta { }

sub tick_count { }

sub name { }

sub version { }

sub build { }

sub uptime { }

sub is_root { }

sub login_name { }

sub node_name { }

sub domain_name { }

sub fs { }

sub bitness { }

1;

__END__

=pod

=head1 NAME

Sys::Info::Driver::<%ID%>::OS - <%ID%> backend

=head1 SYNOPSIS

-

=head1 DESCRIPTION

-

=head1 METHODS

Please see L<Sys::Info::OS> for definitions of these methods and more.

=head2 build

=head2 domain_name

=head2 edition

=head2 fs

=head2 is_root

=head2 login_name

=head2 logon_server

=head2 meta

=head2 name

=head2 node_name

=head2 tick_count

=head2 tz

=head2 uptime

=head2 version

=head2 bitness

=head1 SEE ALSO

L<Sys::Info>, L<Sys::Info::OS>.
=cut

TEMPLATE
}

1;

__END__

=pod

=head1 NAME 

Sys::Info::Helper - Helps to create new Sys::Info drivers.

=head1 SYNOPSIS

=head1 DESCRIPTION

=head1 METHODS

=head2 new

=head1 FUNCTIONS

=head2 new_driver

=head1 SEE ALSO

L<Sys::Info>.

=cut