This file is indexed.

/usr/share/perl5/Geometry/Primitive/Dimension.pm is in libgeometry-primitive-perl 0.22-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
package Geometry::Primitive::Dimension;
use Moose;
use Moose::Util::TypeConstraints;
use MooseX::Storage;

with qw(Geometry::Primitive::Equal MooseX::Clone MooseX::Storage::Deferred);

use overload ('""' => 'to_string');

has 'height' => (
    is => 'rw',
    isa => 'Num',
    default => 0,
);
has 'width' => (
    is => 'rw',
    isa => 'Num',
    default => 0
);

coerce 'Geometry::Primitive::Dimension'
    => from 'ArrayRef'
        => via { Geometry::Primitive::Dimension->new(width => $_->[0], height => $_->[1]) };

sub equal_to {
    my ($self, $other) = @_;

    return (($self->width == $other->width) && $self->height == $other->height);
}

sub to_string {
    my ($self) = @_;

    return $self->width.'x'.$self->height;
}

__PACKAGE__->meta->make_immutable;

no Moose;
1;

=head1 NAME

Geometry::Primitive::Dimension - A width and height

=head1 DESCRIPTION

Geometry::Primitive::Dimension encapsulates a height and width.

=head1 SYNOPSIS

  use Geometry::Primitive::Dimension;

  my $point = Geometry::Primitive::Dimeions->new(width => 100, height => 100);

=head1 ATTRIBUTES

=head2 height

Set/Get the height value.

=head2 width

Set/Get the width value.

=head1 METHODS

=head2 new

Creates a new Geometry::Primitive::Point.

=head2 equal_to

Compares this dimesion to another.

=head2 to_string

Return this dimesion as a string $widthx$height

=head1 AUTHOR

Cory Watson <gphat@cpan.org>

=head1 COPYRIGHT & LICENSE

You can redistribute and/or modify this code under the same terms as Perl
itself.