version 1.1, 2015/06/29 15:42:13
|
version 1.2, 2015/06/30 17:42:14
|
Line 36 use aliased 'Apache::math_parser::Units'
|
Line 36 use aliased 'Apache::math_parser::Units'
|
# @param {boolean} unit_mode |
# @param {boolean} unit_mode |
## |
## |
sub new { |
sub new { |
my $class = shift; |
my ($class, $unit_mode) = @_; |
|
if (!defined $unit_mode) { |
|
$unit_mode = 0; |
|
} |
my $self = { |
my $self = { |
_unit_mode => shift // 0, |
_unit_mode => $unit_mode, |
}; |
}; |
if ($self->{_unit_mode}) { |
if ($self->{_unit_mode}) { |
$self->{_units} = Units->new(); |
$self->{_units} = Units->new(); |