File: Number.pm

package info (click to toggle)
libhtml-template-pluggable-perl 0.22%2B~cs0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 336 kB
  • sloc: perl: 541; makefile: 17
file content (65 lines) | stat: -rw-r--r-- 893 bytes parent folder | download
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
package HTML::Template::Plugin::Dot::Helpers::Number;
$HTML::Template::Plugin::Dot::Helpers::Number::VERSION = '0.07';
use strict;
use warnings;
use base qw/Number::Format/;

sub format_price {
    my $self = shift;
    return unless @_ and defined $_[0]; # suppress a warning in parent
    $self->SUPER::format_price(@_);
}

sub equals
{
    return $_[1] == $_[2];
}

sub le
{
    return $_[1] <= $_[2];
}

sub lt
{
    return $_[1] < $_[2];
}

sub ge
{
    return $_[1] >= $_[2];
}

sub gt
{
    return $_[1] > $_[2];
}

1;

__END__

=head1 NAME

HTML::Template::Plugin::Dot::Helpers::Number - Number formatting and comparison functions

=head1 METHODS

See L<Number::Format> for formatting functions

=over 4

=item format_price

=item equals

=item le, lt, ge, gt

=back

=head1 SEE ALSO

L<HTML::Template::Plugin::Dot::Helpers> for detailed help, license, and contact information.

=cut