Skip Menu |

This queue is for tickets about the PostScript-Calendar CPAN distribution.

Report information
The Basics
Id: 26089
Status: resolved
Priority: 0/
Queue: PostScript-Calendar

People
Owner: Nobody in particular
Requestors: smylers [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.01
Fixed in: 0.02



Subject: Supressing the Title
Hi there. Thank you for PostScript::Calendar -- I was looking for PostScript modules on Cpan for creating a calendar and was amazed to find that your module already produces exactly the kind of calendar I was looking for. Couple of very minor bugs: I originally tried to call the constructor with: title => '' to suppress the title (I'm glueing together several sheets to form a wall planner, without gaps between the months). Unfortunately this was the same as not specifying the title at all and triggered the default title. I was easily able to work round this by specifying: title => ' ' but I thought I'd let you know in case you want to fix this. The Perl 5.10 defined-or operator would be really handy here, but I think if you change line 116 from this: title => ($p{title} || sprintf '%s %d', Month_to_Text($month), $year), to this: title => defined $p{title} ? $p{title} : (sprintf '%s %d', Month_to_Text($month), $year)), that should fix it. Cheers. Smylers
From: perl [...] cjmweb.net
It never occurred to me that somebody might want no title at all, so I didn't implement that. I'll put it in the next release. It will also set title_size & title_skip to 0, so there won't be a blank space where the title would have been. I really like the defined-or operator. Unfortunately, nobody thought of it 5 years ago, so it'll be a while before you can use it and still have portable code. That's why I have a little firstdef function (basically defined-or as a function).
Subject: Re: [rt.cpan.org #26089] Supressing the Title
Date: Wed, 4 Apr 2007 17:19:04 +0100
To: Christopher_J_Madsen via RT <bug-PostScript-Calendar [...] rt.cpan.org>
From: Smylers <Smylers [...] stripey.com>
Christopher_J_Madsen via RT writes: Show quoted text
> It never occurred to me that ...
That's the trouble with users -- they try to do all sorts of things with your software that you never intended! Show quoted text
> I'll put it in the next release.
Thanks -- and double-thanks for being so responsive. Simon