| 1 | use strict; | ||
| 2 | use warnings; | ||
| 3 | |||
| 4 | package PDL::Graphics::Prima::Limits; | ||
| 5 | |||
| 6 | our $VERSION = 0.17; # update with update-version.pl | ||
| 7 | |||
| 8 | # Defines the lm (limits) package in a way that CPAN won't index it | ||
| 9 | package | ||
| 10 | lm; | ||
| 11 | |||
| 12 | use Carp; | ||
| 13 | #our @CARP_NOT = qw(PDL::Graphics::Prima::Axis PDL::Graphics::Prima); | ||
| 14 | |||
| 15 | my $inf; | ||
| 16 | BEGIN { | ||
| 17 | use PDL::Lite; | ||
| 18 | $inf = -PDL->pdl(0)->log->at(0); | ||
| 19 | } | ||
| 20 | |||
| 21 | # The fact that lm::Auto is infinite is exploited in pset::Histogram, so if | ||
| 22 | # you change the representation here, be sure to change the representation | ||
| 23 | # there, too. | ||
| 24 | use constant Auto => $inf; | ||
| 25 | use constant HoldNoWarn => -$inf; | ||
| 26 | sub Hold () { | ||
| 27 | warn("Deprecation notice: unless you speak up, lm::Hold is going to be removed"); | ||
| 28 | return -$inf; | ||
| 29 | } | ||
| 30 | |||
| 31 | 1; | ||
| 32 | |||
| 33 | __END__ |