[26545] in Perl-Users-Digest
Perl-Users Digest, Issue: 8689 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Nov 20 06:05:30 2005
Date: Sun, 20 Nov 2005 03:05:04 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Sun, 20 Nov 2005 Volume: 10 Number: 8689
Today's topics:
Module to handle substitution in error messages? <news@lawshouse.org>
Re: Module to handle substitution in error messages? (Anno Siegel)
sprintf formating <_nospam_stigerikson@yahoo.se>
Web based Image library recommendations <tuxedo@mailinator.com>
Re: Web based Image library recommendations <tintin@invalid.invalid>
Re: Web based Image library recommendations <tuxedo@mailinator.com>
Re: Win32::GUI: Accessability <vtatila@mail.student.oulu.fi>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 19 Nov 2005 23:17:11 +0000
From: Henry Law <news@lawshouse.org>
Subject: Module to handle substitution in error messages?
Message-Id: <1132442206.20941.0@nnrp-t71-03.news.uk.clara.net>
I've googled and CPAN'd for the answer to this one but all my queries
return either zero or a zillion irrelevant entries. Maybe someone here
will know the place to look, or alternatively confirm my suspicion that
what I'm looking for doesn't exist.
In previous programming projects, using languages other than Perl, I
created a set of routines which managed the issuing of error messages.
In summary my program would issue a call (speaking Perl now)
write_error_message(203,"foo","zurb failed",$zurb_rc);
In some file stored separately the error messages would be defined, with
placeholders for the bits that would vary from one invocation to
another; perhaps (I used XML but that's not essential)
<msg id="203" severity="5">
<text>Module %s encountered a '%s' error, rc=%s</text>
<explanation>Some text to guide interpretation</explanation>
</msg>
Then on executing the call an error message would appear thus:
203-5 Module foo encountered a 'zurb failed' error, rc= ... etc
Is there a Message::Parameterise module, or something?
--
Henry Law <>< Manchester, England
------------------------------
Date: 20 Nov 2005 01:46:45 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Module to handle substitution in error messages?
Message-Id: <dloki5$see$1@mamenchi.zrz.TU-Berlin.DE>
John Bokma <john@castleamber.com> wrote in comp.lang.perl.misc:
> Henry Law <news@lawshouse.org> wrote:
>
> > I've googled and CPAN'd for the answer to this one but all my queries
> > return either zero or a zillion irrelevant entries. Maybe someone here
> > will know the place to look, or alternatively confirm my suspicion that
> > what I'm looking for doesn't exist.
> >
> > In previous programming projects, using languages other than Perl, I
> > created a set of routines which managed the issuing of error messages.
> > In summary my program would issue a call (speaking Perl now)
> >
> > write_error_message(203,"foo","zurb failed",$zurb_rc);
> >
> > In some file stored separately the error messages would be defined, with
> > placeholders for the bits that would vary from one invocation to
> > another; perhaps (I used XML but that's not essential)
> >
> > <msg id="203" severity="5">
> > <text>Module %s encountered a '%s' error, rc=%s</text>
> > <explanation>Some text to guide interpretation</explanation>
> > </msg>
> >
> > Then on executing the call an error message would appear thus:
> >
> > 203-5 Module foo encountered a 'zurb failed' error, rc= ... etc
> >
> > Is there a Message::Parameterise module, or something?
>
>
> Yes, it's called sprintf / printf :-D.
>
> sub write_error_message {
>
> my ( $id, @params ) = @_;
>
> my ( $text, $explanation ) = look_up( $id );
>
> printf STDERR "$text\n", @params;
> printf STDERR "$explanation\n";
> }
Tiny correction: The last "printf" should rather be "print". While the
$text part appears to be a printf format, $explanation looks like it
might use "%" innocently.
Anno
--
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
------------------------------
Date: Sun, 20 Nov 2005 11:28:49 +0100
From: stig <_nospam_stigerikson@yahoo.se>
Subject: sprintf formating
Message-Id: <dlpjb2$cf$1@oden.abc.se>
Hello,
i need some help to format a value with sprintf.
lets say i have the value: 1234567.8
i would with, help of sprintf, like it too have a space every third digit,
change the dot to a comma and round the decimals to 2 digits.
i have come up with sprintf("%.2f", 1234567.8) which gives me: 1234567.80
after that i have had no luck to make it look like: 1 234 567,80
how should i write the sprintf format to acheive the above format?
thanks
stig
------------------------------
Date: Sun, 20 Nov 2005 08:38:25 +0100
From: Tuxedo <tuxedo@mailinator.com>
Subject: Web based Image library recommendations
Message-Id: <dlp9th$jnr$01$1@news.t-online.com>
Can anyone recommend some existing and free web based image library
applications suitable for storing and displaying digital photo galleries on
the web? It needs to run on FreeBSD/Apache and of course with perl. Thanks.
------------------------------
Date: Sun, 20 Nov 2005 21:16:58 +1300
From: "Tintin" <tintin@invalid.invalid>
Subject: Re: Web based Image library recommendations
Message-Id: <QhWff.2519$vH5.141991@news.xtra.co.nz>
"Tuxedo" <tuxedo@mailinator.com> wrote in message
news:dlp9th$jnr$01$1@news.t-online.com...
> Can anyone recommend some existing and free web based image library
> applications suitable for storing and displaying digital photo galleries
> on
> the web? It needs to run on FreeBSD/Apache and of course with perl.
> Thanks.
Try
http://cgi.resourceindex.com/Programs_and_Scripts/Perl/Image_Display/Image_Indexing/
------------------------------
Date: Sun, 20 Nov 2005 11:23:27 +0100
From: Tuxedo <tuxedo@mailinator.com>
Subject: Re: Web based Image library recommendations
Message-Id: <dlpjiv$beg$01$1@news.t-online.com>
>
http://cgi.resourceindex.com/Programs_and_Scripts/Perl/Image_Display/Image_Indexing/
Thanks - it should keep me busy evaluating more applications than I want...
------------------------------
Date: Sun, 20 Nov 2005 12:07:13 +0200
From: "Veli-Pekka Tätilä" <vtatila@mail.student.oulu.fi>
Subject: Re: Win32::GUI: Accessability
Message-Id: <dlphsn$fjl$1@news.oulu.fi>
Hi Rob,
Thanks for the clarifications in the other sections. As I don't have further
comments to add to them, I've snipped everything but accessibility.
Rob wrote:
<grids and taborder>
> appears that either the Win32::GUI wrapper or the underlying control
> that is used is not honouring the WS_TABSTOP style correctly.
Oh it would be good to know which. If it is the control's fault I reckon
there's nothing you can do. APart from specifying a modified "default"
window procedure, which might not be wise if people expect things to work
exactly like they do using the Win32 API.
>> Maybe the Win32::GUI could add certain controls in the tab order
>> automatically. <snip> these controls ought to be in the tab
>> order in the first place. <snip>
> I'll add this to my list of things to think about. My immediate
> reaction would be that designing an algorithm that *always* does
> something sensible would be hard.
I thought about this a bit and do agree. MAybe you could add this auto
tab-ordering and handling default and cancel buttons correctly as an
optional feature. AS Perl cannot always guess right, so to speak, you could
have it optionally at least try. By making this change optional and
documenting it properly, you could make the user aware of how the algorithm
works overall and thus maximize the chance of it getting things right.
> The order is defined by the win32 api as the control creation order,
> which in Win32::GUI is the object creation order.
I see. This is a safe bet, in a way, but chances are the user may not wish
to layout things in exactly the tab order, however. I know you can specify
the tab order in the VC dialog editor explicitly, but can you change it in
Win32::GUI?
>>> bug reports through either the perl-win32-gui@users.sourceforge.net
>>> <snip>
>> be lazy and ask what the subscription address is for the former?
> http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
Thanks, I've subscribed now.
--
With kind regards Veli-Pekka Tätilä (vtatila@mail.student.oulu.fi)
Accessibility, game music, synthesizers and programming:
http://www.student.oulu.fi/~vtatila/
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 8689
***************************************