Philip Newton.
p4raw-id: //depot/perl@10821
return $clause;
}
-=item return_clause VALUE, TYPE, INDENT, MACRO, DEFAULT, PRE, POST, PRE, POST
+=item return_clause
+
+return_clause VALUE, TYPE, INDENT, MACRO, DEFAULT, PRE, POST, PRE, POST
A function to return a suitable C<#ifdef> clause. I<MACRO> defaults to
I<VALUE> when not defined. If I<TYPE> is aggregate (eg I<PVN> expects both
=over
-=item $lh = YourProjClass->get_handle( ...langtags... ) || die "lg-handle?";
+=item *
+
+$lh = YourProjClass->get_handle( ...langtags... ) || die "lg-handle?";
This tries loading classes based on the language-tags you give (like
C<("en-US", "sk", "kon", "es-MX", "ja", "i-klingon")>, and for the first class
YourProjClass->fallback_language_classes(). Then in the (probably
quite unlikely) event that that fails, we just return undef.
-=item $lh = YourProjClass->get_handleB<()> || die "lg-handle?";
+=item *
+
+$lh = YourProjClass->get_handleB<()> || die "lg-handle?";
When C<get_handle> is called with an empty parameter list, magic happens:
return $lh;
}
-=item $lh = YourProjClass::langname->new();
+=item *
+
+$lh = YourProjClass::langname->new();
This constructs a language handle. You usually B<don't> call this
directly, but instead let C<get_handle> find a language class to C<use>
and to then call ->new on.
-=item $lh->init();
+=item *
+
+$lh->init();
This is called by ->new to initialize newly-constructed language handles.
If you define an init method in your class, remember that it's usually
beginning), so that all classes get a chance to initialize a new object
however they see fit.
-=item YourProjClass->fallback_languages()
+=item *
+
+YourProjClass->fallback_languages()
C<get_handle> appends the return value of this to the end of
whatever list of languages you pass C<get_handle>. Unless
handle (assuming your language classes are in an appropriate
@INC directory). Or you can use the next method:
-=item YourProjClass->fallback_language_classes()
+=item *
+
+YourProjClass->fallback_language_classes()
C<get_handle> appends the return value of this to the end
of the list of classes it will try using. Unless
=over 2
-=item ffround ( +$scale ) rounds to the $scale'th place left from the '.', counting from the dot. The first digit is numbered 1.
+=item ffround ( +$scale )
-=item ffround ( -$scale ) rounds to the $scale'th place right from the '.', counting from the dot
+rounds to the $scale'th place left from the '.', counting from the dot.
+The first digit is numbered 1.
-=item ffround ( 0 ) rounds to an integer
+=item ffround ( -$scale )
-=item fround ( +$scale ) preserves accuracy to $scale digits from the left (aka significant digits) and paddes the rest with zeros. If the number is between 1 and -1, the significant digits count from the first non-zero after the '.'
+rounds to the $scale'th place right from the '.', counting from the dot
-=item fround ( -$scale ) and fround ( 0 ) are a no-ops
+=item ffround ( 0 )
+
+rounds to an integer
+
+=item fround ( +$scale )
+
+preserves accuracy to $scale digits from the left (aka significant
+digits) and pads the rest with zeros. If the number is between 1 and
+-1, the significant digits count from the first non-zero after the '.'
+
+=item fround ( -$scale ) and fround ( 0 )
+
+are a no-ops
=back
-All rounding functions take as a second parameter a rounding mode from one of
-the following: 'even', 'odd', '+inf', '-inf', 'zero' or 'trunc'.
+All rounding functions take as a second parameter a rounding mode from
+one of the following: 'even', 'odd', '+inf', '-inf', 'zero' or 'trunc'.
The default rounding mode is 'even'. By using
-C<< Math::BigFloat::round_mode($rnd_mode); >> you can get and set the default
-mode for subsequent rounding. The usage of C<$Math::BigFloat::$rnd_mode> is
-no longer supported.
- The second parameter to the round functions then overrides the default
-temporarily.
+C<< Math::BigFloat::round_mode($rnd_mode); >> you can get and set the
+default mode for subsequent rounding. The usage of
+C<$Math::BigFloat::$rnd_mode> is no longer supported.
+The second parameter to the round functions then overrides the default
+temporarily.
The C<< as_number() >> function returns a BigInt from a Math::BigFloat. It uses
'trunc' as rounding mode to make it equivalent to:
=over 2
-=item bfround ( +$scale ) rounds to the $scale'th place left from the '.'
+=item bfround ( +$scale )
-=item bround ( +$scale ) preserves accuracy to $scale sighnificant digits counted from the left and paddes the number with zeros
+rounds to the $scale'th place left from the '.'
-=item bround ( -$scale ) preserves accuracy to $scale significant digits counted from the right and paddes the number with zeros.
+=item bround ( +$scale )
+
+preserves accuracy to $scale significant digits counted from the left
+and pads the number with zeros
+
+=item bround ( -$scale )
+
+preserves accuracy to $scale significant digits counted from the right
+and pads the number with zeros.
=back