Skip Menu |

This queue is for tickets about the Acme-Pi CPAN distribution.

Report information
The Basics
Id: 126022
Status: open
Priority: 0/
Queue: Acme-Pi

People
Owner: Nobody in particular
Requestors: perl [...] toby.ink
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 3.1415926
Fixed in: (no value)



Subject: $π isn't a constant
Mathematically, pi is a constant. Your exported variable $π is variable. To make matters worse, if one module imports $π and alters it, the changes are visible to other modules. Readonly.pm isn't in core, so I can understand not wanting to rely on it. But it should be possible to use it within an eval statement to mark $π as read only for people who have it installed. Alternatively, it could use the not-officially-supported-but-it-ain't-going-away-any-time-soon Internals::SvREADONLY function to mark the variable as read only. (Yes, I know about the method call bug in Perl 5.10.0 and below, but ain't nobody gonna be calling methods on $π.)
On 2018-08-08 03:11:21, TOBYINK wrote: Show quoted text
> Mathematically, pi is a constant. Your exported variable $π is > variable.
There is also the 'π' constant sub.