[30291] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1534 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon May 12 03:14:16 2008

Date: Mon, 12 May 2008 00:14:09 -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           Mon, 12 May 2008     Volume: 11 Number: 1534

Today's topics:
    Re: Perl DBI Module: SQL query where there is space in  <m@rtij.nl.invlalid>
    Re: Perl DBI Module: SQL query where there is space in  <hjp-usenet2@hjp.at>
    Re: Perl DBI Module: SQL query where there is space in  <robsku@NO-SPAM-REMOVE-THIS.fiveam.org>
    Re: Perl DBI Module: SQL query where there is space in  <robsku@NO-SPAM-REMOVE-THIS.fiveam.org>
    Re: Printing a new line <whynot@pozharski.name>
    Re: regex problem unresolved xhoster@gmail.com
    Re: regex problem unresolved <ben@morrow.me.uk>
    Re: XML::Simple xhoster@gmail.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sun, 11 May 2008 22:45:39 +0200
From: Martijn Lievaart <m@rtij.nl.invlalid>
Subject: Re: Perl DBI Module: SQL query where there is space in field name
Message-Id: <pan.2008.05.11.20.45.40@rtij.nl.invlalid>

On Sun, 11 May 2008 15:24:03 +0200, Peter J. Holzer wrote:

> On 2008-05-10 09:18, Martijn Lievaart <m@rtij.nl.invlalid> wrote:
>>
>> Well, there is this slight problem of standards, encoded into RFCs. You
>> don't /have/ to follow them, but it's in general a good idea.
> 
> The relevant RFC in this case would be RFC 2046. As fas as I can see
> Andrew did follow the RFC.

I beg to differ.

> 
>> HTML in usenet postings is definitely not standard and in fact, any
>> serious newsreader (on any platform, even on Windows) does not render
>> it. Even worse, mime-multipart, although a standard for mail, is not a
>> standard for usenet.
> 
> You are mixing up technical standards and social standards. RFC 1036

No, I'm trying not to, although I agree that the technical standards are 
less than clear and the social standards important as well.

> refers to RFC 822 for the article format which has later been extended
> by the series of MIME RFCs (starting with RFC 1341 in 1992). Now one
> could argue that since 1341 came after 1036 and 1036 was never revised,
> 1341 is irrelevant - only plain text US-ASCII is allowed in usenet
> messages. However, that is clearly not practical - Usenet is used for

This is correct.

> discussions in many languages, most of which cannot be expressed
> adequately in US-ASCII. Even if the discussion language is English, the
> topic of the discussion (for example, how to process Chinese text in a
> Perl program) may require another character set. And there is absolutely
> no RFC or other authoritative document which says that MIME Content-Type
> is ok for Usenet and MIME multipart is not. Technically, you have to
> accept MIME as a whole or not at all.

This is also correct. Technically speaking, only ASCII is allowed on 
Usenet by the RFCs.

That this is completely impractical, yes, I agree wholeheartedly. The 
RFCs need updating, badly, which I also said in the post you are replying 
to.

The current state of affairs is that most usenet readers either use 
Latin-1 (or Windows1252), or pay attention to the Content-type header. 
And many do this badly btw. (I would have to search for the details, I 
know Pan hasn't let me down yet, but I frequently encounter other 
newsreaders that make a mess. On further research it's always the other 
newsreader that is at fault. Stuff like setting a correct Content-type 
header for ISO-Latin-1, but forgetting to translate the message you're 
replying to from utf-8).

> 
> However, there is a strong *convention* that Usenet messages (outside of
> the binary groups) should contain only plain text. No images, no fancy
> markup, no sound files, no video. That's a social convention, not a
> technical one. Of course, newsreader authors often only implement
> features for which they see a need - so if nobody posts multipart
> messages, why should they implement support for them? (the newsreader
> you use - Pan - seems to be quite curious in supporting multipart/mixed,
> but not multipart/alternative).

Ah thanks for the correction. I don't do binaries anymore on usenet, so I 
didn't know that.

M4


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

Date: Mon, 12 May 2008 00:06:55 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: Perl DBI Module: SQL query where there is space in field name
Message-Id: <slrng2erg1.k0l.hjp-usenet2@hrunkner.hjp.at>

On 2008-05-11 17:44, Sherman Pendley <spamtrap@dot-app.org> wrote:
> "Waylen Gumbal" <wgumgfy@gmail.com> writes:
>> A. Sinan Unur wrote:
>>> Nope. Post plain text in text only groups.
>> Right. But let me pose this; In the 1980's and even in the 90's, this 
>> was the way things were done, and a lot of it was for technical reasons, 
>> right? Do those reasons still really exist?
>
> No, but the relevant standards are still at that level. If you disagree
> with that, then by all means go through the relevant steps to update them.
> You'll probably find a lot of people who agree with you.

Well, USEFOR did actually get RFC 3977 published after about 10 years or
so. So there is hope. 


>> in a medium such as UseNet ? Any modern news reader should be able to 
>> easily handle multipart messages
>
> Where are the standards that specify how a compliant news reader is required
> to handle multipart messages?

RFC 2046.

Why should a news reader handle them differently than a mail reader? 

> Without such standards, goals such as this, as sensible as they are in
> principle, are very difficult to implement.

Bullshit. MIME may be difficult to implement (it has a few gotchas) but
there is a standard.


> If there were a serious proposition made to write a new RFC defining how
> multipart/alternative messages were to be handled, I'd be all for it.

No new RFC is necessary. The RFC relevant was written in 1992 and last
revised in 1996.

	hp



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

Date: Mon, 12 May 2008 09:13:53 +0300
From: Sir Robin <robsku@NO-SPAM-REMOVE-THIS.fiveam.org>
Subject: Re: Perl DBI Module: SQL query where there is space in field name
Message-Id: <6fmf24loh99jvtvlr1h9tfitsooktmbuc8@4ax.com>

On Sat, 10 May 2008 12:23:46 -0700, Andrew DeFaria <Andrew@DeFaria.com> wrote:

>Martijn Lievaart wrote:
>> Well, there is this slight problem of standards, encoded into RFCs. 
>> You don't /have/ to follow them, but it's in general a good idea. HTML 
>> in usenet postings is definitely not standard and in fact, any serious 
>> newsreader (on any platform, even on Windows) does not render it. Even 
>> worse, mime-multipart, although a standard for mail, is not a standard 
>> for usenet.
>The other problem about RFCs is that they often don't mention or leave 
>open to interpretation many things. You say that HTML in Usenet postings 
>is not a standard. Well there's no standard saying that it is are not 
>allowed either. There's people like you who don't like it because they 
>stick to antiquated software that can't handle it. You say any "serious" 
>newsreader does not render it. I question you use of the term serious. 
>I'd say any serious newsreader should be capable of handling it and 
>doing the right thing. That could be render it to plain text (of which 
>there is a ton of different modules out there capable of doing the task) 
>or showing the plain text portion. *Your* news reading software of 
>choice was either asleep at the wheel or screwed up in it's job. That 
>says much more about your software pick than anything else. Is that a 
>"serious" newsreader? I think not. Hell it can't even handle HTML!

And there is no reason whatsoever why a newsreader should need to be able to
handle HTML - however as there are assholes who post these multipart messages
containing HTML part that has fancy formattings, etc. etc. but which at the
end is nothing but the duplicate of same message again but just in format that
takes multiple times the size of plain text and has no real benefits to it
whatsoever in newsgroups... yes, as there as assholes who post this kind of
messages I do see a reason why a serious newsreader needs to be able to cut
off or (like Agent that I prefer) show the HTML garbage part as attachment
that you can load & save it if there were any reason to do so - while there is
no reason to open let alone save the garbage part this way at least the
garbage will only be shown as a little box way simpler to simply ignore than
huge pile of utterly useless HTML crap.

>> If you post in HTML, there is a very high probability you are either a 
>> troll, or a newbie.
>Ah... no.

Ah... yes. As it does not give any value to the content of your message, makes
your messages multiple times larger and for some readers it shows as a huge
amount of total crap and thus causes negativity - as I can see only negative
things resulting from HTML posting I can only come to conclusion that after
this has been specifically pointed to you clearly you can be classified as a
troll.

>> The old RFCs need an overhaul  anyway. But don't expect HTML to be 
>> adopted for Usenet, there is very  strong opposition to that.
>Yes there are lots of pinheads who love wasting their time brow beating 
>people into their ways of thinking. If you haven't noticed most people 
>never heard of Usenet. Oh but I'm anti-social... Well if I'm anti-social 
>with nerds then so be it!

As I see no advantages whatsoever, couple negative reactions that it causes
and I cant think of how it could possibly cause any harm, problems or other
negative stuff for you to not post in plaintext only, I definately do see that
you are an anti-social prick who needs to stick to doing something the way you
first thought of beeing good because you think that changing behaviour in away
that causes no harm to you or anyone but makes some peoples have more positive
experience would be, like, changing your opinion because someone told you to.
And then you would, like, not have any control at all, people would see that
you are a weakling and would be starting to tell you how to do things and you
could not have any opinions of your own and, like, everything would suck
because you had removed HTML version of the same message in your posts.

I dont know if I should laugh or cry...

-- 
***/---   Sir Robin (aka Jani Saksa) Bi-Sex and proud of it!     ---\***
**/  email: robsku@fiveam.NO-SPAM.org, <*> Reg. Linux user #290577   \**
*| Me, Drugs, DooM, Photos, Writings... http://soul.fiveam.org/robsku |*
**\---                 GSM/SMS: +358 44 927 3992                  ---/**
"Jokainen linkki, jonka päätteenä on ".org", on kelvoton tiedonlähde."
- Nikolas Mäki


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

Date: Mon, 12 May 2008 09:32:29 +0300
From: Sir Robin <robsku@NO-SPAM-REMOVE-THIS.fiveam.org>
Subject: Re: Perl DBI Module: SQL query where there is space in field name
Message-Id: <faof249pcca2cctmngfj4q5fr7rrvc3of6@4ax.com>

On Sat, 10 May 2008 09:59:40 -0700, "Waylen Gumbal" <wgumgfy@gmail.com> wrote:

>A. Sinan Unur wrote:
>
>> Nope. Post plain text in text only groups.
>
>Right. But let me pose this; In the 1980's and even in the 90's, this 
>was the way things were done, and a lot of it was for technical reasons, 
>right? Do those reasons still really exist? Bandwidth is cheap, screen 
>resolutions large, ram plentiful, HD sizes growing like there's no 
>tomorrow, so why use old tech to as a reason to prevent moving forward 
>in a medium such as UseNet ? Any modern news reader should be able to 
>easily handle multipart messages and at least basic HTML without 
>breaking a sweat, so why stifle innovation in the name of preserving old 
>20+ year old paradigms?

In most scenarios (the largest beeing the majority of all usenet messages
written in US-ASCII or with extended ASCII characterset on many
non-international newsgroups) HTML provides no benefits whatsoever and annoys
people. This alone clearly leads to conclusion that using this great
"innovation" that posting HTML copy of same text already coming in plaintext
is in regular usenet messages simply and plainly bad behaviour. Now why would
you insist on behaving badly?

>Is anyone still using an 80x25/50 column terminal?

Sometimes... Sometimes also using SSH client to remotely use my home computer
or some other remote server - very handy, very smooth even if having to use a
slow connection.

>What real systems out 
>there don't have a GUI, I mean come on people, time to come out of the 
>past already.

Need for a GUI depends on what purpose the particular system is set up for -
and GUI or not GUI is not even the issue here... a console newsreader could be
programmed to format HTML or open the HTML part with starting console mode web
browser (Links would be the best one of those I know of and use). But that was
never anyones point here or was it?

>I'm not saying we should all post in HTML, I prefer plain 
>myself, but we should not be so afraid of posts that contain 
>HTML/multiparts.

I think you have mistaken people beeing afraid here with people beeing annoyed
here. I dont think anyone is afraid of HTML usenet garbage.

-- 
***/---   Sir Robin (aka Jani Saksa) Bi-Sex and proud of it!     ---\***
**/  email: robsku@fiveam.NO-SPAM.org, <*> Reg. Linux user #290577   \**
*| Me, Drugs, DooM, Photos, Writings... http://soul.fiveam.org/robsku |*
**\---                 GSM/SMS: +358 44 927 3992                  ---/**
"Jokainen linkki, jonka päätteenä on ".org", on kelvoton tiedonlähde."
- Nikolas Mäki


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

Date: Mon, 12 May 2008 01:05:10 +0300
From: Eric Pozharski <whynot@pozharski.name>
Subject: Re: Printing a new line
Message-Id: <m57kf5xo7f.ln2@orphan.zombinet>

A. Sinan Unur <1usa@llenroc.ude.invalid> wrote:
> kronecker@yahoo.co.uk wrote in news:1581fc33-6137-44a8-b363-
> d15a016988ab@d19g2000prm.googlegroups.com:

*SKIP*
>> print example ($first_name);
>>  print example ($last_name);

> print $example "$_\n" for ( $first_name, $last_name );

Me thinks that would be a bit clearer (and resolvels OP's problem (for
this time))

print $example <<"END_OF_TEXT";
$first_name
$last_name
END_OF_TEXT

*CUT*
-- 
Torvalds' goal for Linux is very simple: World Domination


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

Date: 12 May 2008 00:14:31 GMT
From: xhoster@gmail.com
Subject: Re: regex problem unresolved
Message-Id: <20080511201434.893$Op@newsreader.com>

Jürgen Exner <jurgenex@hotmail.com> wrote:
> Ben Morrow <ben@morrow.me.uk> wrote:
> >Another would be to put something like
> >
> >    use Carp qw/confess/;
> >
> >    $SIG{__DIE__} = sub { confess $_[0] };
> >
> >somewhere near the top of the program, which should give you a complete
> >stack trace when the error occurs.

Ah, very nice.  I tried this, but I couldn't get it to work so I gave up.
It turns out I was using a hard-coded /[l-c]/, which caused compile
time errors which by-pass the sig handler.  When I switched to stuffing
the illegal regex-string into a variable and then invoking /$x/, it worked
like a charm.

>
> Good advise, I will save this somewhere for myself.
> However the OP seems to be pretty inexperienced wrt. programming. I
> doubt that he will be able to put a stack trace to any use.

Well, if nothing else she could come back to us armed with a stack trace
and ask for more help.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.


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

Date: Mon, 12 May 2008 02:41:50 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: regex problem unresolved
Message-Id: <urjkf5-fed.ln1@osiris.mauzo.dyndns.org>


Quoth xhoster@gmail.com:
> Jürgen Exner <jurgenex@hotmail.com> wrote:
> > Ben Morrow <ben@morrow.me.uk> wrote:
> > >Another would be to put something like
> > >
> > >    use Carp qw/confess/;
> > >
> > >    $SIG{__DIE__} = sub { confess $_[0] };
> > >
> > >somewhere near the top of the program, which should give you a complete
> > >stack trace when the error occurs.
> 
> Ah, very nice.  I tried this, but I couldn't get it to work so I gave up.
> It turns out I was using a hard-coded /[l-c]/, which caused compile
> time errors which by-pass the sig handler.

You can catch these by putting the assignment in a BEGIN block (or a
module, of course).

Ben

-- 
"Awww, I'm going to miss her."
"Don't you hate her?"
"Yes, with a fiery vengeance."
                                                         [ben@morrow.me.uk]


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

Date: 12 May 2008 00:37:45 GMT
From: xhoster@gmail.com
Subject: Re: XML::Simple
Message-Id: <20080511203748.801$Tx@newsreader.com>

imthenachoman <imthenachoman@gmail.com> wrote:
> I am having some problems with XML::Simple and forcearray. I am trying
> to get the XML file read in as an array instead of into a hash. I am
> on Perl 5.6.1 and XML::Simple 1.06 and I can not updated. I have to
> figure out how to do this on the system I am on.
>
> #########################################################################
> ########### XML File:
> <?xml version='1.0'?>
> <apps>
>         <app name="a" id="a">
>         </app>
>         <app name="b" id="b">
>         </app>
> </apps>
>
> #########################################################################
> ########### Perl Script:
> my $xml = new XML::Simple();
> my $data = $xml->XMLin(undef, forcearray => ['blah', 'apps','app',
> 'name', 'id'] );

You need to change KeyAttr from its default, e.g.  KeyAttr => [],

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
The costs of publication of this article were defrayed in part by the
payment of page charges. This article must therefore be hereby marked
advertisement in accordance with 18 U.S.C. Section 1734 solely to indicate
this fact.


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

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 1534
***************************************


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