Damian Conway in PBP ch.4 argues for 'use Readonly;' rather than 'constant'.
On 3/5/13, Andrew Langmead <a3n8cch...@snkmail.com> wrote: > On Tue, 2013-03-05 at 08:12 -0500, Jordan Adler wrote: >> Using the constant pragma is best. Perldoc constant. > > the constant pragma (or Readonly) does express intent better than > prototyped subroutines named with uppercase letters that return constant > values. That doesn't apply to the problem here. > > The issue here seems to be how to have a module full of constants that > can be used in a (or more likely many different) modules, and the > constant pragma doesn't implement that part of the solution. > Mike's suggestion about exporting makes sense, but the one thing that > seems a bit odd is that Greg's example didn't have separate packages for > the separate files. Exporting is from one package to another, and a > separate file doesn't create an implicit package. (it could be the > packages were stripped in the "simplified" example posted but were in > Greg's original code.) > > > _______________________________________________ > Boston-pm mailing list > Boston-pm@mail.pm.org > http://mail.pm.org/mailman/listinfo/boston-pm > -- Bill @n1vux bill.n1...@gmail.com _______________________________________________ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm