version 1.1, 2015/06/29 15:42:13
|
version 1.3, 2023/03/13 22:31:22
|
Line 1
|
Line 1
|
# The LearningOnline Network with CAPA - LON-CAPA |
# The LearningOnline Network with CAPA - LON-CAPA |
# CalcEnv |
# CalcEnv |
# |
# |
|
# $Id$ |
|
# |
# Copyright (C) 2014 Michigan State University Board of Trustees |
# Copyright (C) 2014 Michigan State University Board of Trustees |
# |
# |
# This program is free software: you can redistribute it and/or modify |
# This program is free software: you can redistribute it and/or modify |
Line 36 use aliased 'Apache::math_parser::Units'
|
Line 38 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(); |