This file is indexed.

/usr/share/perl5/Task/Weaken.pm is in libtask-weaken-perl 1.05-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
package Task::Weaken; # git description: b27f165

use 5.005;
use strict;

our $VERSION = '1.05';

1;

__END__

=pod

=head1 NAME

Task::Weaken - Ensure that a platform has weaken support

=head1 VERSION

version 1.05

=head1 DESCRIPTION

One recurring problem in modules that use L<Scalar::Util>'s C<weaken>
function is that it is not present in the pure-perl variant.

While this isn't necessarily always a problem in a straight CPAN-based
Perl environment, some operating system distributions only include the
pure-Perl versions, don't include the XS version, and so weaken is
then "missing" from the platform, B<despite> passing a dependency on
L<Scalar::Util> successfully.

Most notably this is RedHat Linux at time of writing, but other come
and go and do the same thing, hence "recurring problem".

The normal solution is to manually write tests in each distribution
to ensure that C<weaken> is available.

This restores the functionality testing to a dependency you do once
in your F<Makefile.PL>, rather than something you have to write extra
tests for each time you write a module.

It should also help make the package auto-generators for the various
operating systems play more nicely, because it introduces a dependency
that they B<have> to have a proper weaken in order to work.

=head2 How this Task works

Part of the problem seems to stem from the fact that some distributions
continue to include modules even if they fail some of their tests.

To get around that for this module, it will do a few dirty tricks.

If L<Scalar::Util> is not available at all, it will issue a normal
dependency on the module. However, if L<Scalar::Util> is relatively
new ( it is E<gt>= 1.19 ) and the module does B<not> have weaken, the
install will bail out altogether with a long error encouraging the
user to seek support from their vendor (this problem happens most
often in vendor-packaged Perl versions).

This distribution also contains tests to ensure that weaken is
available using more normal methods.

So if your module uses C<weaken>, you can just add the following to
your L<Module::Install>-based F<Makefile.PL> (or equivalent).

  requires 'Task::Weaken' => 0;

=head1 SUPPORT

Bugs should be always be reported via the CPAN bug tracker at

L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Task-Weaken>

For other issues,contact the author.

=head1 AUTHOR

Adam Kennedy E<lt>adamk@cpan.orgE<gt>

=head1 SEE ALSO

L<Task>, L<Scalar::Util>, L<http://ali.as/>

=head1 COPYRIGHT

Copyright 2006 - 2011 Adam Kennedy.

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

The full text of the license can be found in the
LICENSE file included with this module.

=cut