[30462] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 1705 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jul 9 14:09:53 2008

Date: Wed, 9 Jul 2008 11:09:13 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 9 Jul 2008     Volume: 11 Number: 1705

Today's topics:
    Re: Constructor API opinions <bugbear@trim_papermule.co.uk_trim>
    Re: Constructor API opinions <m@rtij.nl.invlalid>
    Re: Constructor API opinions <tzz@lifelogs.com>
    Re: FAQ 1.12 What's the difference between "perl" and " <tzz@lifelogs.com>
    Re: FAQ 1.12 What's the difference between "perl" and " <gseesig@gmail.com>
    Re: FAQ 1.12 What's the difference between "perl" and " <gseesig@gmail.com>
    Re: FAQ 1.12 What's the difference between "perl" and " <tzz@lifelogs.com>
    Re: Formatting ASCII to be read by Windows NotePad <rvtol+news@isolution.nl>
    Re: Generating fancy/pretty documents <rvtol+news@isolution.nl>
    Re: help with regular expression <tzz@lifelogs.com>
    Re: help with regular expression <gseesig@gmail.com>
    Re: help with regular expression <someone@example.com>
    Re: help with regular expression <daveb@addr.invalid>
    Re: help with regular expression <gseesig@gmail.com>
    Re: help with regular expression <daveb@addr.invalid>
        new CPAN modules on Wed Jul  9 2008 (Randal Schwartz)
    Re: Question about Encode (Windows-1252 to utf-8) <tzz@lifelogs.com>
    Re: Question about Encode (Windows-1252 to utf-8) <jurgenex@hotmail.com>
        Using mail:sendmail module on IIS6 bk@docstream.no
    Re: Using mail:sendmail module on IIS6 <noreply@gunnar.cc>
    Re: Using mail:sendmail module on IIS6 <spamtrap@dot-app.org>
    Re: Value of "Programming perl" 1st Ed.? <skyler@shaw.ca>
    Re: Value of "Programming perl" 1st Ed.? <uri@stemsystems.com>
    Re: Value of "Programming perl" 1st Ed.? <skyler@shaw.ca>
    Re: Want regex s/// to replace only nth occurrence <rvtol+news@isolution.nl>
    Re: Want regex s/// to replace only nth occurrence <ben@morrow.me.uk>
    Re: XML::DOM question <gseesig@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Wed, 09 Jul 2008 10:45:13 +0100
From: bugbear <bugbear@trim_papermule.co.uk_trim>
Subject: Re: Constructor API opinions
Message-Id: <ysWdnUIwv880FenVnZ2dnUVZ8uadnZ2d@posted.plusnet>

Bob Smith wrote:
> I have a class that is used two ways: given an id, it pulls an object 
> from a web page identified by id, and stores the object in a database. 

I think THAT is your problem; you have one class doing two things.

If the retriever needs DB information, you should pass
an instance of a DB class to the retrieve constructor.

If you simply need to share utility methods
between your two pieces of functionality
they can either both take an instance
of a class with the methods in, or share
a base class.

   BugBear


------------------------------

Date: Wed, 9 Jul 2008 14:04:54 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Constructor API opinions
Message-Id: <pan.2008.07.09.12.04.54@rtij.nl.invlalid>

On Wed, 09 Jul 2008 10:45:13 +0100, bugbear wrote:

> Bob Smith wrote:
>> I have a class that is used two ways: given an id, it pulls an object
>> from a web page identified by id, and stores the object in a database.
> 
> I think THAT is your problem; you have one class doing two things.

May be, may be not. But it is absolutely the correct question to ask.
 
> If the retriever needs DB information, you should pass an instance of a
> DB class to the retrieve constructor.
> 
> If you simply need to share utility methods between your two pieces of
> functionality they can either both take an instance of a class with the
> methods in, or share a base class.

Or create a data class and create separate classes that do the IO.

# error handling omited
my $retr = Retriever->new($optional_proxy_info);
my $obj = Retriever->get($url, $additional_parms);
my $db = $DBIO->new($database_info);
$db->write($obj);

(When faced with inheritance, think hard about doing it another way. 
Inheritance is a good tool, but is way overused.)

M4


------------------------------

Date: Wed, 09 Jul 2008 08:38:00 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Constructor API opinions
Message-Id: <86r6a389fr.fsf@lifelogs.com>

On Tue, 08 Jul 2008 19:28:04 -0700 Bob Smith <nospamplease@yahoo.com> wrote: 

BS> I have a class that is used two ways: given an id, it pulls an object 
BS> from a web page identified by id, and stores the object in a database. 

BS> A different part of the system uses the same class to (later) retrieve 
BS> the object from the database, by id. You can think of this app as a 
BS> small Web scraper. 

BS> My question is, what's the best or recommended way to structure the use 
BS> of the constructor(s). For example:

BS> my $object = MyClass->new($id); 

BS> could mean either (a) get the object from the Web and store it; or (b) 
BS> get the object from the database. 

I like the Rose::DB::Object approach (and you could just inherit from
that class).  You create the object with new() but it's not saved in the
database until you call save().  You also need to call a load function
(there's a bunch, you can search or get a specific table row) to load
the object from the database.  So logically you have the data structure
you're looking for, filling in data from the web site, but then at a
later point you can choose to save() it or not.

I would structure things so $id is your PK in the appropriate table.
Rose::DB::Object supports table relationships, so you can use multiple
tables as needed.

Ted


------------------------------

Date: Wed, 09 Jul 2008 09:02:07 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: FAQ 1.12 What's the difference between "perl" and "Perl"?
Message-Id: <86fxqj88bk.fsf@lifelogs.com>

On Tue, 8 Jul 2008 14:45:33 -0700 "Gordon Corbin Etly" <gvinalcde@gmail.com> wrote: 

GCE> Charlton Wilbur wrote:
>> If you write PERL, you are marking yourself as an outsider in the eyes
>> of people who are at the core of the Perl community.

GCE> I strongly disagree. It shows you are a free thinking individual who 
GCE> doesn't just conform because they are told to.

That would apply to most criminals, most spammers, and the Godzilla
troll too.  I'm just pointing out that "conformity" is not necessarily a
bad thing, not equating you with any of those people.

IMHO, putting "PERL" on your resume is a sure way to disqualify yourself
from decent Perl jobs.  Similarly, using it in a post is a sure way to
annoy people.  You can explain in a footnote that Larry Wall told you it
was OK, it won't matter.  It's a social problem, not a technical one.

As I mentioned above, "conformity" (or, in its less negative forms,
"respect for tradition" and "acceptance of social norms") is not
necessarily a bad thing when you're dealing with social problems.

I'm not sure how much more I can explain this before it becomes like a
talk with a 4-year old.  "Why do I have to share my doll?"--"Because you
should be nice to your sister."--"Why do I have to be nice to her?"--etc.

Ted


------------------------------

Date: Wed, 9 Jul 2008 09:44:14 -0700
From: "Gordon Corbin Etly" <gseesig@gmail.com>
Subject: Re: FAQ 1.12 What's the difference between "perl" and "Perl"?
Message-Id: <6dk86vF30lgjU1@mid.individual.net>

Ted Zlatanov wrote:
> On Tue, 8 Jul 2008 14:45:33 -0700 "Gordon Corbin Etly"
> <gvinalcde@gmail.com> wrote:
> > Charlton Wilbur wrote:

> > > If you write PERL, you are marking yourself as an outsider in the
> > > eyes of people who are at the core of the Perl community.

> > I strongly disagree. It shows you are a free thinking individual who
> > doesn't just conform because they are told to.

> That would apply to most criminals, most spammers, and the Godzilla
> troll too.

That is true, but it's not the case here.


> I'm just pointing out that "conformity" is not necessarily a bad 
> thing,
> not equating you with any of those people.

In this case, it's the forcing of conformity based on a shared belief. 
To me it's wrong to force your beliefs on other people.


> IMHO, putting "PERL" on your resume is a sure way to disqualify
> yourself from decent Perl jobs.

This is just not true. I have been through many kinds of interviews over 
the years, and I have never been disqualified for miss-casing the name 
of a programming language. The end result: it's just not that important.


> Similarly, using it in a post is a sure way to annoy people.  You
> can explain in a footnote that Larry Wall told you it was OK, it
> won't matter.  It's a social problem, not a technical one.

But that is not a reason to force a particular view on everyone. Not 
everyone who is a decent programmer (or "perl hacker") wants to be 
forced to conform to a particular view. You have to realize this or 
you're living in a bubble.


> As I mentioned above, "conformity" (or, in its less negative forms,
> "respect for tradition" and "acceptance of social norms") is not
> necessarily a bad thing when you're dealing with social problems.

I understand what you are saying, but conformity is not the same as 
"respect for tradition" and "acceptance of social norms". It's more of 
an expectation that you comply with someone's or some group's view on 
something - something known as "group think" - giving the perception 
that you must conform, or being pressured to do so, or you're "not one 
of the group."

It's no different then a primary-school kid being outcast for simply 
being different. It's just wrong.


--
Gordon C. Etly
Email: perl -e "print q{}.reverse(q{moc.liamg@ylte.nodrog})" 




------------------------------

Date: Wed, 9 Jul 2008 10:02:18 -0700
From: "Gordon Corbin Etly" <gseesig@gmail.com>
Subject: Re: FAQ 1.12 What's the difference between "perl" and "Perl"?
Message-Id: <6dk98rF310c7U1@mid.individual.net>

Tad J McClellan wrote:
> Waylen Gumbal <wgumgfy@gmail.com> wrote:

> > 2) So what is wrong with writing either of those expansions
> >    as "PERL" for short?

> Because people will think less of you.

No, you mean because *you* may think less of such a person. That's your 
choice, and your opinion. You don't, however, represent *everyone's* 
opinion.


> Telling people that they should not think less of those who
> write PERL will not change their minds.

Why not? Through history, progress has been made by those who dared to 
deviate from the status quo. Do you think the United States, for 
example, would even exist if everyone just went-with-the-flow?


> Seeing people who write PERL and who also know something about
> Perl programming might change their minds.

It does happen, it just goes ignored. I can only wonder why...


> Or, conversely, not seeing people who write PERL display a lack
> of Perl programming skill might change that.

Or perhaps they actually read the main document for the language (or saw 
it in any number of online (or offline) sources), and just shortened 
"Practical Extraction and Report Language" to "PERL"...

If you think about it, it really makes perfect sense... where *else* 
would they have picked up writing it that way. Usually people learn by 
example, so they likely had to have seen it *somewhere*. At least that's 
a far better assumption than "clueless moron."


> You cannot affect what people think "by decree".

Why not, it's what you and your fellows are always doing. And please 
don't deny this.


> They will make their own observations, and form their opinions from
> those.

But at the same time, the rest of us have to conform to those 
"observations and opinions" or else?


> If you want folks to stop thinking less of those who write PERL,
> then consider how you might be able to influence what they observe.

So far I've been using simple logic:

Larry Wall said him self that "Perl stands for Practical Extraction and 
Report Language", and as with many other terms, like, for example, "If I 
Recall Correctly", can be shortened and optionally written in upper case 
as "PERL" (just like you can write IIRC, for example.)

Any rational human being has no trouble with this concept. Ironically, 
only you so-called academia types (and I mean no offense by that - I 
generally have great respect for knowledge) can't seem to grasp this 
simple concept. Either you are unable to, or you don't want to, because 
it's inconvenient or for what ever other reason.


--
Gordon C. Etly
Email: perl -e "print q{}.reverse(q{moc.liamg@ylte.nodrog})" 




------------------------------

Date: Wed, 09 Jul 2008 13:06:04 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: FAQ 1.12 What's the difference between "perl" and "Perl"?
Message-Id: <86d4ln6igj.fsf@lifelogs.com>

On Wed, 9 Jul 2008 09:44:14 -0700 "Gordon Corbin Etly" <gseesig@gmail.com> wrote: 

GCE> Ted Zlatanov wrote:
>> On Tue, 8 Jul 2008 14:45:33 -0700 "Gordon Corbin Etly"
>> <gvinalcde@gmail.com> wrote:
>> > Charlton Wilbur wrote:

>> > > If you write PERL, you are marking yourself as an outsider in the
>> > > eyes of people who are at the core of the Perl community.

>> > I strongly disagree. It shows you are a free thinking individual who
>> > doesn't just conform because they are told to.

>> That would apply to most criminals, most spammers, and the Godzilla
>> troll too.

GCE> That is true, but it's not the case here.

My point is that your statement applies equally, which means that either
the statement doesn't carry a positive meaning and thus doesn't defend
your position, or that you are not saying what you meant to say.

GCE> To me it's wrong to force your beliefs on other people.

Well, you should not live in a society then, or you should modify your
statement, for it surely doesn't say what you meant to say.

>> IMHO, putting "PERL" on your resume is a sure way to disqualify
>> yourself from decent Perl jobs.

GCE> This is just not true. I have been through many kinds of interviews
GCE> over the years, and I have never been disqualified for miss-casing
GCE> the name of a programming language. The end result: it's just not
GCE> that important.

I did say "IMHO" so this is obviously IYHO.  Do you have any Perl
recruiters that will say they won't ding candidates with "PERL"
experience?  I can point to a few, including myself when I've hired
people, that will.  Maybe it does not disqualify altogether, but it's
definitely a big minus and you don't want those on your resume.

>> Similarly, using it in a post is a sure way to annoy people.  You
>> can explain in a footnote that Larry Wall told you it was OK, it
>> won't matter.  It's a social problem, not a technical one.

GCE> But that is not a reason to force a particular view on everyone. Not 
GCE> everyone who is a decent programmer (or "perl hacker") wants to be 
GCE> forced to conform to a particular view. You have to realize this or 
GCE> you're living in a bubble.

Again, it's a social problem and you are twisting it into a individual
vs. society problem.  You can't solve it, and it's not a "view" forced
on anyone.  You may as well solve racism, homophobia, or disabled
parking spaces (again, these are examples, I'm not equating any of them
with your issue).

When the Perl community, and by this I mean a lot of people in many
lists and forums and newsgroups, not just this newsgroup, starts using
"PERL" casually, it's OK to use it in that community.  Until then, it's
not.  Any community has rules, some organic, and this is one of them.

I'm sorry you don't like it, and I wish you luck with using it, since it
honestly doesn't matter to me at all.  In 20 years, I assure you it
won't matter to anyone at all (but RAKUDO might).  I'm just trying to
explain to you, since you're so persistent in advocating your position,
why it's irrelevant to the Perl community and annoying to us who have to
read the same argument over and over.

>> As I mentioned above, "conformity" (or, in its less negative forms,
>> "respect for tradition" and "acceptance of social norms") is not
>> necessarily a bad thing when you're dealing with social problems.

GCE> It's no different then a primary-school kid being outcast for
GCE> simply being different. It's just wrong.

Well, if you created wonderful Perl code, put it on CPAN, or even just
posted here for a few months helping people, I'm sure when you used
"PERL" people wouldn't mind any more than they mind all-lowercase
posters like Uri or other, more eccentric people.  In other words,
tolerance = contributions^2/eccentricity (0 when contributions == 0).
And, of course, weight_of_opinion = contributions^2.

Ted


------------------------------

Date: Wed, 9 Jul 2008 13:49:18 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Formatting ASCII to be read by Windows NotePad
Message-Id: <g52fua.13k.1@news.isolution.nl>

Sherman Pendley schreef:
> Bill H:

>> Reading this thread I feel like I am back at school on the
>> playground and someone just yelled FIGHT!
>
> Funny you should say that - I'm beginning to feel like the only adult
> in a playground full of screaming children.

It is more like one paving stone on which some guys are unhappy
together, for ever unnoticed by the players on the rest of the
playground.

-- 
Affijn, Ruud

"Gewoon is een tijger."



------------------------------

Date: Wed, 9 Jul 2008 13:52:16 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Generating fancy/pretty documents
Message-Id: <g52fub.13k.1@news.isolution.nl>

Bernie Cosell schreef:

> Suggestions on how to produce "nice" text documents from Perl?  Plain
> text is easy, of course, but I need to be able to do
> fancier/formatted stuff. What I've done in the past is generate HTML
> [with <tables>, <fonts>, etc] and then use an app like HTMLDOC to
> convert that to PDF (and, indeed, a long time back I used to generate
> troff input and use ghostscript to process *that*).  That kind of
> approach sort of works, but the whole procedure is a bit klunky and
> fragile.  Is there some way to produce "pretty" PDF or ODF document
> directly?  I see there's a suite of modules PDF::API2 -- it looks
> pretty complicated....anyone used that?  PDF::Create also seems
> complicated. 

Maybe you are looking for XML::ApacheFOP. 

-- 
Affijn, Ruud

"Gewoon is een tijger."


------------------------------

Date: Wed, 09 Jul 2008 08:47:28 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: help with regular expression
Message-Id: <86k5fv88zz.fsf@lifelogs.com>

On Tue, 8 Jul 2008 11:31:47 -0700 (PDT) doug <douglass_davis@earthlink.net> wrote: 

d> The syntax is, you may group words with double quotes.

d> You may also add a + to signify a word must be present, or a - to
d> signify it shouldn't be present.  Each "phrase" is separated by spaces
d> or commas.

d> So for example, all of these would be valid and can be combined by
d> separating them with spaces:

d> +"red blue"
d> +orange
d> purple
d> -green
d> "yellow  red"

d> Is there a way to split this or match this using a regular expression?

Yes, but it will be nasty.  You're better off parsing the text in a
stateful way, with knowledge of "I'm inside/outside quotes", "this is a
required word," etc. flags.  You'll end up with some kind of parse tree
like this

use constant MUST => 1;
use constant MUST_NOT => 2;

SEARCH -> 
 [ 
  { term => 'red blue', required => MUST()     },
  { term => 'orange', required => MUST()     },
  { term => 'green',    required => MUST_NOT() },
  { term => 'purple' },
  { term => 'yellow red' },
 ]

If Parse::RecDescent is fast enough for your needs, you may want to
consider it.  The way it structures grammars is (IMO) intuitive and Perl
6 will use a very similar system.

If not, you'll have to write some logic to find terms and set the flags.

Once you have a parse tree, you can construct a DB query or whatever
backend query will handle your search.

Ted


------------------------------

Date: Wed, 9 Jul 2008 09:22:59 -0700
From: "Gordon Corbin Etly" <gseesig@gmail.com>
Subject: Re: help with regular expression
Message-Id: <6dk6v5F2oi11U1@mid.individual.net>

Tad J McClellan wrote:
> doug <douglass_davis@earthlink.net> wrote:

> > I am making a page to do a search.
> >
> > The syntax is, you may group words with double quotes.

> What is your definition of a "word"?
>
> I will assume \w+ is a "word".

Is it not safer to assume something like \b\w+(?:'\w+)\b as a word? This 
will match "don't" or "joe's", for example, as whole words.


--
Gordon C. Etly
Email: perl -e "print q{}.reverse(q{moc.liamg@ylte.nodrog})" 




------------------------------

Date: Wed, 09 Jul 2008 16:40:21 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: help with regular expression
Message-Id: <VR5dk.60344$kx.45139@pd7urf3no>

Gordon Corbin Etly wrote:
> Tad J McClellan wrote:
>> doug <douglass_davis@earthlink.net> wrote:
> 
>>> I am making a page to do a search.
>>>
>>> The syntax is, you may group words with double quotes.
> 
>> What is your definition of a "word"?
>>
>> I will assume \w+ is a "word".
> 
> Is it not safer to assume something like \b\w+(?:'\w+)\b as a word? This 
> will match "don't" or "joe's", for example, as whole words.

\b\w+(?:'\w+)\b

Can be more simply written as:

\w+'\w+

Perhaps you meant:

\w+(?:'\w+)?



John
-- 
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall


------------------------------

Date: Wed, 09 Jul 2008 19:16:32 +0200
From: Dave B <daveb@addr.invalid>
Subject: Re: help with regular expression
Message-Id: <g52rn7$gf1$1@registered.motzarella.org>

Gordon Corbin Etly wrote:

> Tad J McClellan wrote:
>> doug <douglass_davis@earthlink.net> wrote:
> 
>>> I am making a page to do a search.
>>>
>>> The syntax is, you may group words with double quotes.
> 
>> What is your definition of a "word"?
>>
>> I will assume \w+ is a "word".
> 
> Is it not safer to assume something like \b\w+(?:'\w+)\b as a word? This 
> will match "don't" or "joe's", for example, as whole words.

As I understand it,

\b\w+\b

and

\w+

mean exactly the same thing. So what you mean is really

\w+(?:'\w+)

or, more likely,

\w+(?:'\w+)?

which might or might not appropriate.

-- 
D.


------------------------------

Date: Wed, 9 Jul 2008 10:36:20 -0700
From: "Gordon Corbin Etly" <gseesig@gmail.com>
Subject: Re: help with regular expression
Message-Id: <6dkb8lF31hu7U1@mid.individual.net>

John W. Krahn wrote:
> Gordon Corbin Etly wrote:
> > Tad J McClellan wrote:
> > > doug <douglass_davis@earthlink.net> wrote:

> > > > I am making a page to do a search.
> > > >
> > > > The syntax is, you may group words with double quotes.

> > > What is your definition of a "word"?
> > >
> > > I will assume \w+ is a "word".

> > Is it not safer to assume something like \b\w+(?:'\w+)\b as a word?
> > This will match "don't" or "joe's", for example, as whole words.

> \b\w+(?:'\w+)\b
>
> Can be more simply written as:
>
> \w+'\w+

Actually I meant to type:

\b\w+(?:'\w+)?\b

But you are write, the \b's aren't needed here. They would be needed, 
however, if you are matching something addition to just word characters, 
so it's not a bad idea to have them in there if there is any chance what 
is to be matched may be altered.


> Perhaps you meant:
>
> \w+(?:'\w+)?

Yes this is exactly what I mean to write (I forgot the conditional `?` 
that you added.) Thanks for catching that.


--
Gordon C. Etly
Email: perl -e "print q{}.reverse(q{moc.liamg@ylte.nodrog})" 




------------------------------

Date: Wed, 09 Jul 2008 20:07:35 +0200
From: Dave B <daveb@addr.invalid>
Subject: Re: help with regular expression
Message-Id: <g52umu$857$1@registered.motzarella.org>

Gordon Corbin Etly wrote:

> Actually I meant to type:
> 
> \b\w+(?:'\w+)?\b
> 
> But you are write, the \b's aren't needed here. They would be needed, 
> however, if you are matching something addition to just word characters, 

For example?

-- 
D.


------------------------------

Date: Wed, 9 Jul 2008 04:42:19 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Wed Jul  9 2008
Message-Id: <K3q2EJ.1Asx@zorch.sf-bay.org>

The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN).  You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.

Algorithm-ClusterPoints-0.07
http://search.cpan.org/~salva/Algorithm-ClusterPoints-0.07/
find clusters inside a set of points 
----
Archive-Lha-0.04
http://search.cpan.org/~ishigaki/Archive-Lha-0.04/
extract .LZH archives 
----
BDB-1.6
http://search.cpan.org/~mlehmann/BDB-1.6/
Asynchronous Berkeley DB access 
----
Catalyst-Controller-Mobile-JP-0.01
http://search.cpan.org/~tomita/Catalyst-Controller-Mobile-JP-0.01/
decode/encode with Encode::JP::Mobile 
----
Catalyst-Model-DBIS-0.02
http://search.cpan.org/~tomita/Catalyst-Model-DBIS-0.02/
DBIx::Simple model class 
----
Catalyst-Plugin-FormValidator-Simple-Messages-0.02
http://search.cpan.org/~miyazaki/Catalyst-Plugin-FormValidator-Simple-Messages-0.02/
FormValidator::Simple can be handled by plural Catalyst application in mod_perl 
----
Class-Data-Localize-0.02
http://search.cpan.org/~sknpp/Class-Data-Localize-0.02/
Localizable, inheritable, overridable class data 
----
Coro-4.744
http://search.cpan.org/~mlehmann/Coro-4.744/
coroutine process abstraction 
----
CouchDB-Client-0.02
http://search.cpan.org/~rberjon/CouchDB-Client-0.02/
Simple, correct client for CouchDB 
----
CouchDB-Deploy-0.02
http://search.cpan.org/~rberjon/CouchDB-Deploy-0.02/
Simple configuration scripting to deploy CouchDB databases 
----
Crypt-RSA-1.98
http://search.cpan.org/~vipul/Crypt-RSA-1.98/
RSA public-key cryptosystem. 
----
DBIx-Admin-BackupRestore-1.13
http://search.cpan.org/~rsavage/DBIx-Admin-BackupRestore-1.13/
Backup all tables in a database to XML, and restore them 
----
DateTimeX-Web-0.03
http://search.cpan.org/~ishigaki/DateTimeX-Web-0.03/
DateTime factory for web apps 
----
Devel-Cycle-1.10
http://search.cpan.org/~lds/Devel-Cycle-1.10/
Find memory cycles in objects 
----
EV-3.43
http://search.cpan.org/~mlehmann/EV-3.43/
perl interface to libev, a high performance full-featured event loop 
----
Email-Address-Loose-0.01
http://search.cpan.org/~tomita/Email-Address-Loose-0.01/
Make Email::Address->parse() loose 
----
Email-MIME-Attachment-Stripper-1.315
http://search.cpan.org/~rjbs/Email-MIME-Attachment-Stripper-1.315/
strip the attachments from an email 
----
File-VirusScan-0.100_02
http://search.cpan.org/~doneill/File-VirusScan-0.100_02/
Unified interface for virus scanning of files/directories 
----
Geo-EOP-0.10
http://search.cpan.org/~markov/Geo-EOP-0.10/
Earth Observation Products EOP (formely HMA) 
----
Gtk2-CV-1.53
http://search.cpan.org/~mlehmann/Gtk2-CV-1.53/
----
HTML-MobileJp-Filter-0.01_01
http://search.cpan.org/~tomita/HTML-MobileJp-Filter-0.01_01/
Glue of modules for fighting with Japanese mobile web 
----
HTML-Tabulate-0.29
http://search.cpan.org/~gavinc/HTML-Tabulate-0.29/
HTML table rendering class 
----
HTML-TurboForm-0.20
http://search.cpan.org/~camelcase/HTML-TurboForm-0.20/
----
Imager-Filter-Bakumatsu-0.02
http://search.cpan.org/~tomita/Imager-Filter-Bakumatsu-0.02/
Photo vintage filter 
----
JS-Test-Simple-0.25
http://search.cpan.org/~ingy/JS-Test-Simple-0.25/
----
JSON-Any-1.17
http://search.cpan.org/~rberjon/JSON-Any-1.17/
Wrapper Class for the various JSON classes. 
----
LWP-Protocol-socks-1.1
http://search.cpan.org/~scr/LWP-Protocol-socks-1.1/
adds support for the socks protocol and proxy facility 
----
Lingua-Any-Numbers-0.23
http://search.cpan.org/~burak/Lingua-Any-Numbers-0.23/
Converts numbers into (any available language) string. 
----
Lingua-JA-FindDates-0.004
http://search.cpan.org/~bkb/Lingua-JA-FindDates-0.004/
find Japanese dates & convert them 
----
Math-RngStream-0.01
http://search.cpan.org/~salva/Math-RngStream-0.01/
Perl wrapper for the RngStreams library 
----
Module-CPANTS-Analyse-0.82
http://search.cpan.org/~domm/Module-CPANTS-Analyse-0.82/
Generate Kwalitee ratings for a distribution 
----
ODG-Record-0.27
http://search.cpan.org/~ctbrown/ODG-Record-0.27/
Perl extension for manipulating row based records. 
----
POE-Component-RemoteTail-0.01001
http://search.cpan.org/~miki/POE-Component-RemoteTail-0.01001/
tail to remote server's access_log on ssh connection. 
----
POE-Component-RemoteTail-0.01002
http://search.cpan.org/~miki/POE-Component-RemoteTail-0.01002/
tail to remote server's access_log on ssh connection. 
----
Perl-Command-0.01
http://search.cpan.org/~samv/Perl-Command-0.01/
return an ARGV for running this perl 
----
PerlIO-code-0.02
http://search.cpan.org/~gfuji/PerlIO-code-0.02/
Makes a simple I/O filter 
----
Pg-Loader-0.04
http://search.cpan.org/~ioannis/Pg-Loader-0.04/
Perl extension for loading Postgres tables 
----
Pg-Loader-0.05
http://search.cpan.org/~ioannis/Pg-Loader-0.05/
Perl extension for loading Postgres tables 
----
Pod-Server-1.01
http://search.cpan.org/~beppu/Pod-Server-1.01/
a web server for locally installed perl documentation 
----
Queue-Q4M-0.00007
http://search.cpan.org/~dmaki/Queue-Q4M-0.00007/
Simple Interface To q4m 
----
Queue-Q4M-0.00008
http://search.cpan.org/~dmaki/Queue-Q4M-0.00008/
Simple Interface To q4m 
----
Shell-GetEnv-0.07
http://search.cpan.org/~djerius/Shell-GetEnv-0.07/
extract the environment from a shell after executing commands 
----
Sys-Info-Driver-Windows-XS-0.21
http://search.cpan.org/~burak/Sys-Info-Driver-Windows-XS-0.21/
XS Wrappers for Sys::Info Windows driver 
----
Test-Classy-0.02
http://search.cpan.org/~ishigaki/Test-Classy-0.02/
write your unit tests in other modules than *.t 
----
Test-Parser-1.8
http://search.cpan.org/~markwkm/Test-Parser-1.8/
Base class for parsing log files from test runs, and displays in an XML syntax. 
----
Test-Presenter-0.5
http://search.cpan.org/~markwkm/Test-Presenter-0.5/
A module for results Presentation. 
----
WWW-Discogs-0.03
http://search.cpan.org/~leedo/WWW-Discogs-0.03/
----
WikiText-0.09
http://search.cpan.org/~ingy/WikiText-0.09/
Wiki Text Conversion Tools 
----
Win32-ASP-CGI-0.11
http://search.cpan.org/~burak/Win32-ASP-CGI-0.11/
A module for Classic ASP (PerlScript) Programming 
----
X3D-Debug-0.011_002
http://search.cpan.org/~hooo/X3D-Debug-0.011_002/
Perl extension for blah blah blah 
----
XML-Compile-0.88
http://search.cpan.org/~markov/XML-Compile-0.88/
Compilation based XML processing 
----
XML-Compile-Cache-0.12
http://search.cpan.org/~markov/XML-Compile-Cache-0.12/
Cache compiled XML translators 
----
XML-FeedWriter-0.01
http://search.cpan.org/~ishigaki/XML-FeedWriter-0.01/
simple RSS writer 
----
XML-FeedWriter-0.02
http://search.cpan.org/~ishigaki/XML-FeedWriter-0.02/
simple RSS writer 
----
sofu-config-0.5
http://search.cpan.org/~maluku/sofu-config-0.5/


If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.

This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
  http://www.stonehenge.com/merlyn/LinuxMag/col82.html

print "Just another Perl hacker," # the original

--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


------------------------------

Date: Wed, 09 Jul 2008 09:06:09 -0500
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: Question about Encode (Windows-1252 to utf-8)
Message-Id: <86bq17884u.fsf@lifelogs.com>

On Tue, 8 Jul 2008 16:40:53 -0700 (PDT) williams.wilkie@gmail.com wrote: 

ww> Hello! I have recently been turned on to Encode. We have some folks
ww> who are copying and pasting from Word straight into our CMS and the
ww> need to convert from "Windows-1252" to "utf-8" is now critical.

ww> For a one liner  I have been using this....
ww> perl -MEncode=from_to -i -pe 'from_to($_, "windows-1252", "utf-8")'
ww> file1.txt file2.txt

ww> Works good for editing in place.

ww> My quandry is that now I need to tackle multiple files in a directory
ww> and another developer mentioned that if "UTF-8" and "Windows-1252" are
ww> intermixed in a file that it may get confused 

Why don't you try it?  If it doesn't work for you, post an example and
what fails.

ww> and I should do a transliteration like..

ww> tr/\x93/\N{LEFT DOUBLE QUOTATION MARK}/;

I would avoid that solution, it's extremely dangerous compared to
Encode.  You may destroy valid UTF-8 data.

ww> I wonder if that's really true and when it comes to open and closing
ww> file handles for this should I be using something like "binmode
ww> OUTPUTFILEHANDLE, ':bytes';"

Maybe, depending on the file contents.  Again, try it.

Ted


------------------------------

Date: Wed, 09 Jul 2008 15:34:59 GMT
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: Question about Encode (Windows-1252 to utf-8)
Message-Id: <2jl9741hr7gk9tn9ttck9gv3vpf1qddnqd@4ax.com>

williams.wilkie@gmail.com wrote:
>My quandry is that now I need to tackle multiple files in a directory
>and another developer mentioned that if "UTF-8" and "Windows-1252" are
>intermixed in a file that it may get confused and I should do a
>transliteration like..

Unless the file format supports multiple encodings within the same file
(like e.g. a MIME email) a file can have only one encoding. 

>tr/\x93/\N{LEFT DOUBLE QUOTATION MARK}/;

Nuts!

>I am impressed with Encode but any advice or words that anyone wants
>to throw in would be greatly appreciated.

The only way to survive the encoding nightmare and stay sane is to
standardize _ALL_ your data on _ONE SINGLE_ encoding. I strongly
recommend UTF-8, but that's up to you. 
Any conversion between this standard format and other formats happens
(if at all)  _ONLY_ for user interaction, e.g. to support legacy email
clients which don't support UTF-8 or accept input from a web page in ISO
8859-15 or even Greek, Arabic or Chinese or similar tasks. Of course, if
at all possible even this user interaction should use the agreed-upon
standard.

jue
(with a decade of internationalizing and localizing software)


------------------------------

Date: Wed, 9 Jul 2008 01:52:15 -0700 (PDT)
From: bk@docstream.no
Subject: Using mail:sendmail module on IIS6
Message-Id: <4f67c421-a687-481a-acf7-e180e518eaf6@t54g2000hsg.googlegroups.com>

Hi

My system:
- Windows 2003 server with IIS6
- Activeperl 5.10.0.1002 win32 x86
- mail:sendmail 0.79

I try to send a mail from a perl script using the mail:sendmail
module, but as soon as i  include the sentence use mail:sendmail this
error arrives:

CGI Error
The specified CGI application misbehaved by not returning a complete
set of HTTP headers.

The script was originally developed years ago and used up till today
on a win2000 with IIS5 with no problem, so the issue must be win2003/
IIS6.

Anyone have any similar problem, and found a solution on this??

I found this article on google with a similar problem, but it did not
help me:

http://www.webmasterworld.com/forum13/3304.htm

Regards

Bjarte Kvalheim


------------------------------

Date: Wed, 09 Jul 2008 11:24:47 +0200
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Using mail:sendmail module on IIS6
Message-Id: <6djej7F2r19uU1@mid.individual.net>

bk@docstream.no wrote:
> I try to send a mail from a perl script using the mail:sendmail
> module, but as soon as i  include the sentence use mail:sendmail this
> error arrives:
> 
> CGI Error
> The specified CGI application misbehaved by not returning a complete
> set of HTTP headers.

There is no mail:sendmail module. Perl is case sensitive, and double 
colon is used in module names.

     use Mail::Sendmail;

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


------------------------------

Date: Wed, 09 Jul 2008 13:07:43 -0400
From: Sherman Pendley <spamtrap@dot-app.org>
Subject: Re: Using mail:sendmail module on IIS6
Message-Id: <m11w239eao.fsf@dot-app.org>

bk@docstream.no writes:

> Hi
>
> My system:
> - Windows 2003 server with IIS6
> - Activeperl 5.10.0.1002 win32 x86
> - mail:sendmail 0.79
>
> I try to send a mail from a perl script using the mail:sendmail
> module, but as soon as i  include the sentence use mail:sendmail this
> error arrives:
>
> CGI Error
> The specified CGI application misbehaved by not returning a complete
> set of HTTP headers.

The first place to look is your server's error logs. That's where
you'll find the actual error message that your Perl is producing
instead of the HTTP headers that the server expects.

There's also a couple of good links to be found in "perldoc -q 500":

    <http://www.perl.org/troubleshooting_CGI.html>
    <http://www.perl.org/CGI_MetaFAQ.html>

sherm--

-- 
My blog: http://shermspace.blogspot.com
Cocoa programming in Perl: http://camelbones.sourceforge.net


------------------------------

Date: Wed, 09 Jul 2008 10:10:42 -0700
From: Skyler <skyler@shaw.ca>
Subject: Re: Value of "Programming perl" 1st Ed.?
Message-Id: <6h6dk.4920$cn7.1079@flpi145.ffdc.sbc.com>

Uri Guttman wrote:
>>>>>> "S" == Skyler  <skyler@shaw.ca> writes:
> 
> S> You're not a very good liar, you know. Seems you have a whole legion
> S> of followers ready to kiss your feet at a moments notice.
> 
> i am not a good liar, how observant of you!!

That's got to be the first accurate thing you've hacked up in quote a while.

 > thank you for such kind words.

Any time.

> but notice you don't see people saying plonk after my posts.

That's because they probably don't bother to even open them or dumped 
you eons ago.

>   S> Yep, keep proving that you are utterly unarmed and you don't even know
>   S> how to throw a rock. Go home already.
> 
> but i am home. 

Oh sorry, I though you were in rehab.

> have fun being you!

Thanks. With you to fûck with, it couldn't get anymore fun. Sorta 
reminds me of cow tipping.


-sky


------------------------------

Date: Wed, 09 Jul 2008 17:25:48 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Value of "Programming perl" 1st Ed.?
Message-Id: <x7abgrm0ki.fsf@mail.sysarch.com>

>>>>> "S" == Skyler  <skyler@shaw.ca> writes:

  S> Thanks. With you to fûck with, it couldn't get anymore fun. Sorta
  S> reminds me of cow tipping.

nah, you still don't get it. i am the regular here with respect. you are
a flaming newbie with nothing. i am toying with you like a cat and a
mouse. you are the mouse if you haven't figured that out. now show some
of your perl code or shut up. this group is a meritocracy and talking
perl is how you gain creds. flaming others for foolish reasons gains you
nothing but kill file entries. and i order you again to reply in a
wasteful effort.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
--------- Free Perl Training --- http://perlhunter.com/college.html ---------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------


------------------------------

Date: Wed, 09 Jul 2008 10:44:22 -0700
From: Skyler <skyler@shaw.ca>
Subject: Re: Value of "Programming perl" 1st Ed.?
Message-Id: <%N6dk.13229$uE5.8170@flpi144.ffdc.sbc.com>

Uri Guttman wrote:
>>>>>> "S" == Skyler  <skyler@shaw.ca> writes:
> 
>   S> Thanks. With you to fûck with, it couldn't get anymore fun. Sorta
>   S> reminds me of cow tipping.
> 
> nah, you still don't get it. i am the regular here with respect. 

Respect? Why would anyone respect someone who gives them none.

> you are the mouse if you haven't figured that out. 

Perhaps only in the Tom & Jerry sense. It seems every time you swipe at 
me, you can't quite hit the target, and before you realize it, I've run 
under you and crammed your tail into a power socket.

> flaming others for foolish reasons

Yet it's perfectly ok for you and your kind to do so to others.

-sky


------------------------------

Date: Wed, 9 Jul 2008 15:04:01 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Want regex s/// to replace only nth occurrence
Message-Id: <g52k78.14o.1@news.isolution.nl>

jerrykrinock@gmail.com schreef:

> in DBI database queries, to replace "
> = ? " with "IS NULL" when placeholders are undef.

Yuck, why would you ever want to do that, and even then: in that ugly
way?


> my $query = q{SELECT name FROM pets
>     WHERE
>         size = ? AND disease   = ? AND 'age' = ? and `color`=? and
> speed>?} ;
> my @values = ("small", undef, 3, undef, 66) ;

Maybe you can use something like this:

# does this really need that variance in column name quoting?
  my $query_f = q{SELECT name FROM pets WHERE size %s AND disease %s AND
'age' %s AND `color` %s};

  my $query  = sprintf $query_f, map {defined() ? '?' : 'IS NULL'}
@values;
  my @bind_values = grep defined(), @values;

(untested)

-- 
Affijn, Ruud

"Gewoon is een tijger."



------------------------------

Date: Wed, 9 Jul 2008 15:04:30 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Want regex s/// to replace only nth occurrence
Message-Id: <e4tek5-2dn2.ln1@osiris.mauzo.dyndns.org>


Quoth jerrykrinock@gmail.com:
> 
> Gunnar's solution I was able to understand and modify to do what I
> really wanted to do, which is, in DBI database queries, to replace "
> = ? " with "IS NULL" when placeholders are undef.

Try SQL::Abstract.

Ben

-- 
               We do not stop playing because we grow old; 
                  we grow old because we stop playing.
                            ben@morrow.me.uk


------------------------------

Date: Wed, 9 Jul 2008 09:18:29 -0700
From: "Gordon Corbin Etly" <gseesig@gmail.com>
Subject: Re: XML::DOM question
Message-Id: <6dk6mnF2tp5kU1@mid.individual.net>

Sherman Pendley wrote:
> "Gordon Corbin Etly" <g.seesig@gmail.com> writes:
> > Sherman Pendley wrote:
> > > Konstantinos Agouros <elwood@agouros.de> writes:

> > > > if XML::DOM fails in getElementsByTagName by Script terminates.
> > > > is there a way to catch this?

> > > Does is fail immediately, when you call this method? If so, you
> > > could try wrapping the call in a block eval:
> > >
> > >    eval {
> > >        my $nodeList = $doc->getElementsByTagName('FOO');
> > >    }
> > >
> > >    if ($@) {
> > >        # Handle the failure
> > >        warn $@;
> > >    }

> > Keep in mind that $nodeList should be declared outside (and before)
> > that eval statement, otherwise it's gone with the wind once the eval
> > block finishes. And I know it's sample code, but it may be worth it
> > to quick-note the fact that your eval is missing a semicolon at the
> > end - the syntax error message wasn't too helpful, until I realized
> > that was the problem. In a complex program it would be that more
> > harder to weed out :)

> Agreed on all counts. Thanks for catching my mistakes - that'll teach
> me to post without proofreading. :-)

No problem.


--
Gordon C. Etly
Email: perl -e "print q{}.reverse(q{moc.liamg@ylte.nodrog})" 




------------------------------

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 V11 Issue 1705
***************************************


home help back first fref pref prev next nref lref last post