Skip Menu |

This queue is for tickets about the List-Maker CPAN distribution.

Report information
The Basics
Id: 18038
Status: open
Priority: 0/
Queue: List-Maker

People
Owner: Nobody in particular
Requestors: cdevilbiss [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: v0.0.2
Fixed in: v0.0.2



Subject: No synopsis in README
The "[REPLACE THIS...]" block hasn't been replaced in List::Maker's README file to give a high-level overview of what it does.
Subject: Re: [rt.cpan.org #18038] No synopsis in README
Date: Wed, 08 Mar 2006 10:31:32 +1100
To: bug-List-Maker [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Show quoted text
> The "[REPLACE THIS...]" block hasn't been replaced in List::Maker's > README file to give a high-level overview of what it does.
D'oh! Fixed and re-uploaded. Thanks, Colin! Damian
Subject: Re: [rt.cpan.org #18038] No synopsis in README
Date: Tue, 7 Mar 2006 18:32:42 -0600
To: bug-List-Maker [...] rt.cpan.org
From: "Colin DeVilbiss" <cdevilbiss [...] gmail.com>
On 3/7/06, damian@conway.org via RT <bug-List-Maker@rt.cpan.org> wrote: Show quoted text
> > The "[REPLACE THIS...]" block hasn't been replaced in List::Maker's > > README file to give a high-level overview of what it does.
> > D'oh! Fixed and re-uploaded. Thanks, Colin!
No problem; thanks for being so quick about it! By the way, thanks also for Perl Best Practices. We use Perl for automated testing of remote systems, and our code base has become a mess. We're using your book to restructure stuff now. Actually, on the topic of Perl Best Practices, how do you deal with publishing constant values? That is, I've got a boatload of named constant values that pass over the wire, and I'd like to put them in one central module and use them everywhere. However, it seems like the natural interface would be package variables (or, more accurately, Readonly package variables), which goes against the recommendations in the book. At the moment, we use two different approaches in different "constants" modules. One publishes them as "sub Foo { return '000001234' }" and one of them publishes them as "our $foo = new FooObject(@args)". Do you have a recommendation? Thanks for fixing List::Maker! Colin
Subject: Re: [rt.cpan.org #18038] No synopsis in README
Date: Thu, 09 Mar 2006 14:58:20 +1100
To: bug-List-Maker [...] rt.cpan.org
From: Damian Conway <damian [...] conway.org>
Show quoted text
> By the way, thanks also for Perl Best Practices. We use Perl for > automated testing of remote systems, and our code base has become a > mess. We're using your book to restructure stuff now.
I'm glad you're finding it valuable. Show quoted text
> Actually, on the topic of Perl Best Practices, how do you deal with > publishing constant values? > > That is, I've got a boatload of named constant values that pass over > the wire, and I'd like to put them in one central module and use them > everywhere. However, it seems like the natural interface would be > package variables (or, more accurately, Readonly package variables), > which goes against the recommendations in the book. > > At the moment, we use two different approaches in different > "constants" modules. One publishes them as "sub Foo { return > '000001234' }" and one of them publishes them as "our $foo = new > FooObject(@args)". > > Do you have a recommendation?
PBP recommends using the Readonly module to create variables that represent constants. However, the book also recommends not exporting variables as part of an interface. Which creates something of an impasse when it comes to exporting constants. To resolve this conflict, we have to consider the *reason* PBP cautions against variables in interfaces: that changes to those variables are global in effect. However, constants, by their very nature cannot be changed, so the problem is no longer a problem. That being the case, I'd suggest using Readonly'd variables to store constants, and exporting from the module. Hope that helps, Damian