This file is indexed.

/usr/lib/perl5/Date/Simple/Fmt.pm is in libdate-simple-perl 3.03.03-1build3.

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
package Date::Simple::Fmt;
use Date::Simple 3;
use base qw/Date::Simple/;
use overload '""' => '_format';

*EXPORT      = *Date::Simple::EXPORT;
*EXPORT_OK   = *Date::Simple::EXPORT_OK;
*EXPORT_TAGS = *Date::Simple::EXPORT_TAGS;

sub d8    { shift->_d8(@_) }
sub today { shift->_today(@_) }
sub ymd   { shift->_ymd(@_) }

sub new {
    my ( $class, $fmt, @args ) = @_;
    my $self = $class->SUPER::new(@args);
    $self->default_format($fmt);
    $self;
}

sub _format { shift->format() }

1;

=head1 NAME

Date::Simple::Fmt - Sub class of Date::Simple with per object level formatting for
overloaded stringification.

=head1 SYNOPSIS

    use Date::Simple::Fmt;

=head1 DESCRIPTION

This module changes the default stringification behaviour of Date::Simple objects to
use the format() method instead. It also changes the behaviour of the constructor.

=item Date::Simple::Fmt->new (FMT, [ARG, ...])

=item date_fmt (FMT, [ARG, ...])

Follows the same rules as for the equivelent method (new) and subroutine (date) in
Date::Simple except that the first argument is expected to be the default format for
the newly created object.  It is this format that will be used when using overloaded
stringification or when not providing a format argument to the format() method.

=head1 SEE ALSO

L<Date::Simple> for full documentation.

=cut