diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-03-08 05:07:06 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-03-08 05:07:06 +0000 |
commit | 163572841be338608d3535ad9a78c98e8701df15 (patch) | |
tree | 4d441959b0e6cb2ba7278b4ceaa58a7d92e8d791 /pod/perldelta.pod | |
parent | a945beb3a887c5c3b1c5d1e6f7a3c798af0a1b04 (diff) | |
download | perl-163572841be338608d3535ad9a78c98e8701df15.tar.gz |
Make the stringification more customizable.
A potentially backward incompatible change.
Based on a suggestion by Roman Kosenko <ra@amk.al.lg.ua>.
p4raw-id: //depot/cfgperl@5607
Diffstat (limited to 'pod/perldelta.pod')
-rw-r--r-- | pod/perldelta.pod | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 052162b49e..8fc8efe2b7 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -1678,6 +1678,22 @@ and C<~> are now supported on bigints. The accessor methods Re, Im, arg, abs, rho, and theta can now also act as mutators (accessor $z->Re(), mutator $z->Re(3)). +The class method C<display_format> and the corresponding object method +C<display_format>, in addition to accepting just one argument, now can +also accept a parameter hash. Recognized keys of a parameter hash are +C<"style">, which corresponds to the old one parameter case, and two +new parameters: C<"format">, which is a printf()-style format string +(defaults usually to C<"%.15g">, you can revert to the default by +setting the format string to C<undef>) used for both parts of a +complex number, and C<"polar_pretty_print"> (defaults to true), +which controls whether an attempt is made to try to recognize small +multiples and rationals of pi (2pi, pi/2) at the argument (angle) of a +polar complex number. + +The potentially disruptive change is that in list context both methods +now I<return the parameter hash>, instead of only the value of the +C<"style"> parameter. + =item Math::Trig A little bit of radial trigonometry (cylindrical and spherical), |