/usr/share/perl5/Class/MakeMethods/Template/Class.pm is in libclass-makemethods-perl 1.01-4.
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 | package Class::MakeMethods::Template::Class;
use Class::MakeMethods::Template::Generic '-isasubclass';
$VERSION = 1.008;
use strict;
require 5.0;
use Carp;
=head1 NAME
Class::MakeMethods::Template::Class - Associate information with a package
=head1 SYNOPSIS
package MyObject;
use Class::MakeMethods::Template::Class (
scalar => [ 'foo' ]
);
package main;
MyObject->foo('bar')
print MyObject->foo();
=head1 DESCRIPTION
These meta-methods provide access to class-specific values. They are similar to Static, except that each subclass has separate values.
=cut
sub generic {
{
'-import' => {
'Template::Generic:generic' => '*'
},
'modifier' => {
},
'code_expr' => {
'_VALUE_' => '_ATTR_{data}->{_SELF_CLASS_}',
},
}
}
########################################################################
=head2 Class:scalar
Creates methods to handle a scalar variable in the declaring package.
See the documentation on C<Generic:scalar> for interfaces and behaviors.
=cut
########################################################################
=head2 Class:array
Creates methods to handle a array variable in the declaring package.
See the documentation on C<Generic:array> for interfaces and behaviors.
=cut
sub array {
{
'-import' => {
'Template::Generic:array' => '*',
},
'modifier' => {
'-all' => q{ _REF_VALUE_ or @{_ATTR_{data}->{_SELF_CLASS_}} = (); * },
},
'code_expr' => {
'_VALUE_' => '\@{_ATTR_{data}->{_SELF_CLASS_}}',
},
}
}
########################################################################
=head2 Class:hash
Creates methods to handle a hash variable in the declaring package.
See the documentation on C<Generic:hash> for interfaces and behaviors.
=cut
sub hash {
{
'-import' => {
'Template::Generic:hash' => '*',
},
'modifier' => {
'-all' => q{ _REF_VALUE_ or %{_ATTR_{data}->{_SELF_CLASS_}} = (); * },
},
'code_expr' => {
'_VALUE_' => '\%{_ATTR_{data}->{_SELF_CLASS_}}',
},
}
}
1;
|