[24832] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6983 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 9 18:06:15 2004

Date: Thu, 9 Sep 2004 15:05:06 -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           Thu, 9 Sep 2004     Volume: 10 Number: 6983

Today's topics:
        "RFC": re [un]pack() <bik.mido@tiscalinet.it>
        $| (undocumented) magic? <bik.mido@tiscalinet.it>
    Re: another try (Anno Siegel)
    Re: Efficient Data Storage ctcgag@hotmail.com
    Re: Object Oriented Perl : Query (Anno Siegel)
    Re: parsing UTF-8 chars out of POST data <flavell@ph.gla.ac.uk>
    Re: parsing XML using a regular expression <kkeller-usenet@wombat.san-francisco.ca.us>
    Re: Perl and Inheritance strangeness. <news@ant-roy.co.uk>
    Re: Perl and Inheritance strangeness. <news@ant-roy.co.uk>
    Re: Perl inconsistency <uri@stemsystems.com>
    Re: Perl inconsistency <notvalid@email.com>
    Re: Perl web automation question ref javascript:dt_pop <brian_helterline@hp.com>
        Perl XSLT module? <news@ant-roy.co.uk>
        Problem with Compress::Zlib <no_given_address@landofthelost.net>
    Re: Sybase DBI Returned data query Rob.Buxton@wcc.govt.nz
    Re: web services... <news@ant-roy.co.uk>
    Re: Xah Lee's Unixism <jeff@ccvcorp.com>
    Re: Xah Lee's Unixism <cbfalconer@yahoo.com>
    Re: Xah Lee's Unixism <cbfalconer@yahoo.com>
    Re: Xah Lee's Unixism <cbfalconer@yahoo.com>
    Re: Xah Lee's Unixism <john.thingstad@chello.no>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 09 Sep 2004 23:15:25 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: "RFC": re [un]pack()
Message-Id: <gb71k0ls58i0rjjjjuk0otgq0cg8t7fti1@4ax.com>

To be fair I had the idea I'm about to expose while developing a new
japh of mine (the one about which I'm talking in my other post),
though I think that this may be useful in "production" code too...

Coming to the point, it often happens to resort to "cascaded"
[un]pack()s. In my specific case I have

  $coded=pack 'u', pack 'w', $something;

and respectively

  $something=unpack 'w', unpack 'u', $coded;

but even longer combinations are possible/common. Now I understand
that this stresses the natural order in which transformations are
applied, though I wonder if templates could be cascaded instead, by
means of a new metacharachter, e.g. C<:>, a la

  $coded=pack 'u:w', $something;    # Or perhaps 'w:u'
  $something=unpack 'w:u', $coded;  # 'u:w'?

Should this be considered too error-prone or undesirable for any
reason, disambiguation may come from supplying "cascaded" parameters
by means of a different data type, a la

  $coded=pack ['u', 'w'], $something;  # Or perhaps 'w:u'
  $coded=unpack ['w', 'u'], $something;  # 'u:w'?

Any thought?


Michele
-- 
you'll see that it shouldn't be so. AND, the writting as usuall is
fantastic incompetent. To illustrate, i quote:
- Xah Lee trolling on clpmisc,
  "perl bug File::Basename and Perl's nature"


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

Date: Thu, 09 Sep 2004 23:15:24 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: $| (undocumented) magic?
Message-Id: <udb1k01b574opq7l9pv82501se3m0ef308@4ax.com>

While trying my hand at a new japh[*], I've found that $| can only
hold either 0 or 1 (I guess):

  # perl -le 'print $|=10'

Though I can't seem to find any mention of this fact in 'perldoc
perlvar'. BTW: is this behaviour supposed to be supported in the
future too? And is it always been?


[*] FWIW, basically I had a piece of code like s/./1&ord$&/ge; but
then I also needed to have $|=1, and since I didn't want yet another
statement (it revealed to be more of a golfing exercise than a japhing
one) I changed it to s/./++$|&ord$&/ge; which *does* work fine, only
that, thinking of it better I realized that had $| been a "normal"
variable, it shouldn't have!


Michele
-- 
you'll see that it shouldn't be so. AND, the writting as usuall is
fantastic incompetent. To illustrate, i quote:
- Xah Lee trolling on clpmisc,
  "perl bug File::Basename and Perl's nature"


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

Date: 9 Sep 2004 19:45:25 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: another try
Message-Id: <chqbsl$g35$1@mamenchi.zrz.TU-Berlin.DE>

Darius <dmedhora@yahoo.com> wrote in comp.lang.perl.misc:
> Hi, 
> Here goes again. Please excuse the repeat question. But then, I got no
> response that could be 'matched' as appropriate :)
> 
> I have many lines in a bad xml file that are like the long one below:
> <word_word1 string="start" date="2004-09-02 07:33:22" id="2033878"
> word_id="2000589" get_id="8647" ><word name="MOVIE"><film
> title="S"things Gotta Give" the_number="531780"
> /></word></word_word1><film title="S'&quote Gotta Give"
> the_number="531780" />
> 
> I don't want to try XML::parser yet,

That is a good reason to ask the newsgroup to go the hard way and
solve problems that have been solved elsewhere?  Give a better one.

>                                      so, not caring about whether this
> is an xml file or not,

We're programmers.  If this is xml, that is valuable structure that
can be exploited.  Ignoring it makes life harder than it has to be.

>                         there are 2 occurences of "Gotta" in this
> string and these 2
> occurences need to be pre-fixed by "Somethings" between the first "=\"

See?  It's the two occurrences that give you trouble.  If the titles
were orderly parsed out, each would have only one occurrence.  Problem
gone, right?

> just
> before the "Gotta", and, the "Gotta"
> 
> So: ="S'&quote Gotta Give" should become ="Somethings Gotta Give"
> and ="S"things Gotta Give" should become  ------ditto-----
> etc.
> e.g ="Something's Gotta Give" should become ="Somethings Gotta Give"
> 
> The characters before the Gotta and first =\" just before it, are not
> static
> so I can't use lookbehinds :( or can I?

No, not easily.  Probably not at all.

> I tried this so far:
> while( $line=~/(.*)(=\")(.*?)(Gotta)/g ){
>                 print "\n$2$3$4\n";
> }
> 
> which gave me:
> 
> ="S'&quote Gotta
> 
> But I could't get the Gotta previous to this in the string :( and so I
> am not able to repeat the while loop successfully.
> 
> Can anyone help me with this ? Thx

You must describe in some more detail just what can come between
/="/ and /Gotta/. As long as you don't the problem is ill-defined
and you won't solve it.  Hint: Try a string that doesn't contain 
another /=/.

Anno


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

Date: 09 Sep 2004 20:25:22 GMT
From: ctcgag@hotmail.com
Subject: Re: Efficient Data Storage
Message-Id: <20040909162522.511$0y@newsreader.com>

"Aaron DeLoach" <aaron@deloachcorp.com> wrote:
> Hello,
>
> I have run into unfamiliar ground. Some guidance would be appreciated.
>
> This project has grown from 1,000 or so users to over 50,000 users. The
> project has been an overall success, so it's time to spend a little on
> the investment.

It makes a huge difference whether those 50,000 users access one cgi page
per week, on average, or one cgi page per minute.

> Currently, we are getting our own servers (in lieu of ISP
> shared servers) setup with mod_perl and are revisiting a lot of the code
> to make things more efficient. Hopefully, in a month or so we can make
> the switch.

Do you have specific performance complaints?  One should keep general
efficiency in mind, but it is better focus on specific problems if they
exist.

> At present, user records are stored each in a single file using the
> Data::Dumper module and the whole project works through the %user = eval
> <FILE> method.

How big are these files?

> User files are stored in directories named after the first
> two characters of the user ID to keep the directories smaller, in theory,
> for quicker searching of files (?). The records are read/written
> throughout the use of the program in the method described.

Hopefully there are a few subroutines which are invoked throughout the
program to cause the files to be read or written.  If it is IO code, not
subroutines, which are throughout the program, than any changes will be
difficult.  Then the first thing I would do is leave the actual physical
storage the same, but consildate all the IO into a few subroutines, so that
you can just swap out subroutines to test different methods.


> I don't know how much efficiency would be gained by using an alternate
> storage method. Perhaps MySQL?

My gut feeling is that it would not lead to large performance
improvements if all you do is use MySQL instead of the file system
as a bit bucket to store your Data::Dumper strings.  Especially if
your server has a lot of memory and aggresively caches the FS.


> None of us are very familiar with
> databases, although it doesn't seem very hard. We are looking into
> storing the records as binary files which seems promising, but would like
> some input on the data storage/retrieval methods available before we do
> anything.

By binary files, do you mean using Storable rather than Data::Dumper?

I would expect that to make more of a performance difference than the
MySQL vs file system.

> I should mention that the project was first written in Perl and will
> remain that way. Some suggestions were to investigate a different
> language. But that's out of the question for now. We would rather
> increase efficiency in the Perl code. Servers will remain Linux/Apache.
>
> Any thoughts?

I'd spend some time investigating where the time is going now.
Make a script that does something like:

use strict;
use blahblah;
## all the other preliminaries that your real programs have to go through.

exit if $ARGV[0] == 1;

my $data = load_file_for_user($ARGV[1]);
exit if $ARGV[0] == 2;

my $user_ref = eval $data;
exit if $ARGV[0] == 3;

Do_whatever_your_most_common_task_is($user_ref);
exit if $ARGV[0] ==4;
### etc.


then write another program:

my $start=time;
foreach my $level (1..4) {
  foreach (1..1000) {
    my $u = randomly_chosen_user();
    system "./first_program.pl $level $u" and die $!;
  };
  print "Level $level, ", $start-time, "\n";
};

if level 1 time is almost as big as level 4 time, then the overhead
of compilation and startup is your biggest problem.  etc.

Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service                        $9.95/Month 30GB


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

Date: 9 Sep 2004 19:08:16 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Object Oriented Perl : Query
Message-Id: <chq9n0$env$1@mamenchi.zrz.TU-Berlin.DE>

Peter J. Acklam <pjacklam@online.no> wrote in comp.lang.perl.misc:
> anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:
> 
> > Peter J. Acklam <pjacklam@online.no> wrote:
> >
> > > The "$class = ref($obj) || $obj;" construction is used many
> > > places in the Perl docs and the Perl standard modules, so
> > 
> > Yes.  Much to the regret of some of us.  It's a pretty idiom,
> > and it has been propagated by well-renowned people.  (I'm
> > tempted to say, people who should know better :)
> 
> Personally, I have let "$obj->new" be exactly the same as
> "ref($obj)->new" which wasn't even mentioned on Randal's page.

I'm not saying that it is fundamentally wrong to do that.  But the
decision to let a method (any method, not just ->new) be callable
both ways is a design decision not to be taken lightly.  There are
methods that naturally work that way, most prominently those that
ignore their first argument.  Those are fair game, the user doesn't
even have to know if they're class- or object methods.  The call of
a class method through an object still looks confusing because it
looks like the individual object mattered while it doesn't.

The ->new method is not of this kind (it *does* use its first argument),
and in those cases there should be a solid reason for enabling the
potentially misleading call.  "It's easy to do and might come in handy"
is not a solid reason.

> > > Anyway, if it's use is disallowed an appropriate error message
> > > should be given.  Maybe something like this:
> > > 
> > >     sub new {
> > >       my $class = shift;
> > >       croak "new(): not an instance method" if ref $class;
> > >       ...
> > >     }
> > 
> > Perhaps, but only because users may have come to expect it to be
> > callable that way.  Basically, ->new is a class method and the
> > user has no business calling it through an object.  If they do,
> > they may as well deal with the consequences.
> 
> Users all to often do things they have no business of doing.  :-)

True.

> I think that *all* inappropriate or incorrect usage should display
> a descriptive error message.

Well, that's an ideal, probably even an attainable ideal with the right
technology, but in practice I tend to make a difference.

Errors that I expect to be caused (and seen) by the end user must be
caught and reported (in the end-user's terms, as far as possible).
Those are mostly what would be classified as data- or input errors.

Another type is usage errors.  They happen through inappropriate
usage of the class (module, software, library, whatever), and are
only seen while an application of the class is written, not when
it's debugged and running.  Those can be caught by whatever internal
mechanism catches them.  So I wouldn't check the first parameter of
a class method that isn't documented to be callable through an object
but let Perl die on whatever the consequences are.

Anno



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

Date: Thu, 9 Sep 2004 21:18:47 +0100
From: "Alan J. Flavell" <flavell@ph.gla.ac.uk>
Subject: Re: parsing UTF-8 chars out of POST data
Message-Id: <Pine.LNX.4.61.0409092103510.25101@ppepc56.ph.gla.ac.uk>

On Thu, 9 Sep 2004, Aaron Anodide wrote:

> Well, I answered by own question:

That's as may be, but your answer is good only for a relatively narrow 
range of problems.

That fact is (I'm sorry to say) that processing i18n form submissions 
is a nontrivial matter, not made any easier by numerous anomalies and 
oddities in browsers.  But all of that part of the problem is on-topic 
in a WWW authoring group (e.g comp.infosystems.www.authoring.cgi - 
beware the automoderation bot), and the locals around here don't like 
to see their group misused for discussing that.  (Because they've got 
enough to worry about with the i18n implementations in Perl - no 
offence meant).

I'm afraid the only genuine advice I can offer at this point is to
hone your expertise in the matter of partitioning a problem into its
components - where necessary, instrumenting the interfaces between 
them so that you can see clearly what is going on - and seeking 
advice on each of the problem domains in its appropriate place.

> The content-type of the page collecting the password was set to utf-8,

Which is actually a good solution, if you need to handle a wide 
character repertoire, and don't need to worry about antique browsers
up to and including Netscape 4.  But I'm wandering into areas that are 
off-topic for this group.

> so the ALT+156 was put into the post data as two bytes, %C2%A3.

That was obvious (which is a way of trying, and failing, to say 
politely that if it wasn't evident to you, then you're a bit out of 
your depth; but that can be remedied if you're willing to put in a 
bit of effort).

>  When I set the content-type to charset=ISO-8859-1, then ALT-156 was 
> put into the post data as one byte, %A3, which in turn was correctly 
> parsed by CGI::unescape.

Indeed.  But now what happens if they type-in a character that isn't
representable in the iso-8859-1 encoding?  There's no way that you can 
stop them doing so, and so, I'd say, your server-side process needs to 
be able to cope with the consequences, even if only by politely 
telling them they provided invalid input and please to try again.

At risk of blowing my own trumpet for a part of the problem domain 
that really is the off-topic part of your question here, see: 
http://ppewww.ph.gla.ac.uk/~flavell/charset/form-i18n.html - but 
please, I beg you, don't try to discuss the contents here, or the 
regulars will bite.

good luck


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

Date: Thu, 09 Sep 2004 13:51:34 -0700
From: Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us>
Subject: Re: parsing XML using a regular expression
Message-Id: <mbs612xuh4.ln2@goaway.wombat.san-francisco.ca.us>

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

On 2004-09-09, Leif Wessman <leifwessman@hotmail.com> wrote:
>
> I was trying to find a general solution to parsing both HTML and
> xml-files. And I didn't know that regular expressions was such a bad
> idea when parsing XML. Now I know, and now I will build a solution
> using regular expressions for HTML and an XML-parser for the XML-files.

Why don't you use an HTML parser for HTML files?  There are plenty of
HTML modules on CPAN (some harder to use than others).

- --keith

- -- 
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://wombat.san-francisco.ca.us/cgi-bin/fom

-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBQMJVhVcNCxZ5ID8RAidCAKCYJEAfINNrNnGYbNTSm5l6ajOtjQCcDNWv
piEehBybRAYVFktHHGDphdM=
=lIB9
-----END PGP SIGNATURE-----


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

Date: Thu, 09 Sep 2004 20:13:11 GMT
From: antroy <news@ant-roy.co.uk>
Subject: Re: Perl and Inheritance strangeness.
Message-Id: <rP20d.119$9n5.18@newsfe1-gui.ntli.net>

Tad McClellan wrote:

> Anthony Roy <news@ant-roy.co.uk> wrote:
> 
> 
>>Four example files are at the bottom of this email 
> 
>                                           ^^^^^^^^^^
>                                           ^^^^^^^^^^
> 
> Usenet is not email!

Thanks for the constructive advice. No really. Prick.

-- 
Ant...


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

Date: Thu, 09 Sep 2004 21:15:47 GMT
From: antroy <news@ant-roy.co.uk>
Subject: Re: Perl and Inheritance strangeness.
Message-Id: <7K30d.250$Eg5.101@newsfe4-gui.ntli.net>

Hi Anno,

Anno Siegel wrote:
 ...
> You're better off using strict (and warnings).  Introduce them in
> your code and try again.  Also, use Data::Dumper to see what your
> objects actually contain.
> 
> See the problem now?

Yep. The main one being that I was missing the -> when setting values in 
the $self hash. Thanks to the pointer to the strict module. I am a long 
time OO programmer, but new to Perl, and so tips like these I find valuable.

> Inheritance in Perl does have its issues, but on the level you're
> acting here it works just fine.  Your code is in error, in several
> places.  Strict will point them out.

And it did :-)

-- 
Ant...


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

Date: Thu, 09 Sep 2004 18:16:27 GMT
From: Uri Guttman <uri@stemsystems.com>
Subject: Re: Perl inconsistency
Message-Id: <x7hdq7s3zt.fsf@mail.sysarch.com>

>>>>> "MM" == Mike Mimic <ppagee@yahoo.com> writes:

  MM> But it is interesting that if you try this:

  MM> open(FILE, '<file.txt');
  MM> if ($_ = <FILE>) {
  MM> 	print "$_\n";
  MM> }
  MM> close(FILE);

  MM> Perl complains with:

  MM> Value of <HANDLE> construct can be "0"; test with defined()

because that is not handled as a special case.

  MM> And the same could be with while(<HANDLE>).

there is no warning because while is special cased for that. you have to
look at the history of this feature as it has changed several times over
the years. originally nothing was done and you had to do an explicit
defined check in a while(<>). later a warning was added if you didn't
check and finally the defined was implicitly added. that may not be a
totally accurate description of the history but it is close enough. so
stop whining about consistancy. perl has never been consistant nor will
perl6 fix all of that. it will still be perl and still DWIM in many
place that will make life easier for perl hackers and annoy others who
don't get it.

uri

-- 
Uri Guttman  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org


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

Date: Thu, 09 Sep 2004 19:48:03 GMT
From: Ala Qumsieh <notvalid@email.com>
Subject: Re: Perl inconsistency
Message-Id: <Tr20d.18096$HM7.17510@newssvr29.news.prodigy.com>

Mike Mimic wrote:

> But it is interesting that if you try this:
> 
> open(FILE, '<file.txt');
> if ($_ = <FILE>) {
>     print "$_\n";
> }
> close(FILE);
> 
> Perl complains with:
> 
> Value of <HANDLE> construct can be "0"; test with defined()
> 
> And the same could be with while(<HANDLE>).

No. Please don't! Perl's (other) motto is to keep simple things simple 
and hard things possible.

I would venture to guess that

	if ($_ = <FILE>)

is not very useful, and a very tiny percentage of programs need it. The 
other case:

	while (<FILE>)

is ubiquitous and is a standard way of reading a file. I would really 
hate it if I had to do:

	while (defined ($_ = <FILE>))

DWIMery is one of the best things in Perl. Widely used idioms should be 
simple and straight forward. Weirder idioms should be possible.

--Ala


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

Date: Thu, 9 Sep 2004 13:25:28 -0700
From: "Brian Helterline" <brian_helterline@hp.com>
Subject: Re: Perl web automation question ref javascript:dt_pop
Message-Id: <4140bc8e@usenet01.boi.hp.com>

"phil court" <dunkirk_phil@hotmail.com> wrote in message
news:chpbqv$eek1@cvis05.marconicomms.com...
> Hi all,
>
> I am trying to write a script to retrieve a web page. the script is
detailed
> below. My problem is as follows.
>
> The script can successfully obtain web pages such as http://news.bbc.co.uk
> and http://www.dreamteamfc.com
>
> However it fails on the following URL
>
http://www.dreamteamfc.com/dtfc04/servlet/PostPlayerList?catidx=1&title=GOAL
> KEEPERS&gameid=167

It would appear that this website uses cookies and a little JavaScript. Both
of these are handled by your browser but not by LWP by default. LWP can
handle
cookies, but not JavaScript.

If you really want to see what's going on, check out the web scraping proxy
(wsp)
project http://www.research.att.com/~hpk/wsp/
It will log *all* traffic generated by your browser.

There is another nifty hack at http://hacks.oreilly.com/pub/h/955
that will turn the output of wsp into a perl script for you.

Enjoy!

-brian




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

Date: Thu, 09 Sep 2004 20:08:41 GMT
From: antroy <news@ant-roy.co.uk>
Subject: Perl XSLT module?
Message-Id: <dL20d.421$K62.86@newsfe6-win.ntli.net>

Hi all,

What is considered the best Perl module for performing XSLT 
transformations? I am looking to write a perl CGI script for 
transforming some XML into HTML on the fly using XSLT.

Thanks,

-- 
Ant...


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

Date: Thu, 09 Sep 2004 14:08:33 -0600
From: "Mr. No Address" <no_given_address@landofthelost.net>
Subject: Problem with Compress::Zlib
Message-Id: <chqend$790$1@news.nems.noaa.gov>

I have two machines with fresh Debian Sarge installs.  On both I've 
tried to "install Bundle::CPAN" and they both fail in the same way.  It 
looks like it might be a problem with Compress::Zlib.  If I try to 
install Compress::Zlib by itself I get the following:

~>perl -v
This is perl, v5.8.4 built for i386-linux-thread-multi

~>perl -MCPAN -e shell
cpan> install Compress::Zlib
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
   Database was generated on Thu, 09 Sep 2004 07:08:49 GMT
Running install for module Compress::Zlib
Running make for P/PM/PMQS/Compress-Zlib-1.33.tar.gz
CPAN: Digest::MD5 loaded ok
Checksum for 
/root/.cpan/sources/authors/id/P/PM/PMQS/Compress-Zlib-1.33.tar.gz ok
Scanning cache /root/.cpan/build for sizes
Compress-Zlib-1.33/
### Similar lines deleted ###

   CPAN.pm: Going to build P/PM/PMQS/Compress-Zlib-1.33.tar.gz

Parsing config.in...
Building Zlib enabled
Looks Good.
Up/Downgrade complete.
Checking if your kit is complete...
Looks good
Writing Makefile for Compress::Zlib
     -- NOT OK
Running make test
   Can't test without successful make
Running make install
   make had returned bad status, install seems impossible



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

Date: Fri, 10 Sep 2004 09:03:58 +1200
From: Rob.Buxton@wcc.govt.nz
Subject: Re: Sybase DBI Returned data query
Message-Id: <c4h1k01ortqh9ueumdei1b3nbb2nr09dvf@4ax.com>

On 8 Sep 2004 23:37:18 -0700, michael.peppler@gmail.com (Michael
Peppler) wrote:

>Rob.Buxton@wcc.govt.nz wrote in message news:<6stuj0p9uu257impt3tddevi6usmh924i3@4ax.com>...
>
>> The database connection works fine and the actual sth->execute does
>> change the password via the sp_password stored procedure.
>> Snippet of code below.
>> 
>> my $query="execute sp_password '$PASSWORD', '$pass', '$name'"; 
>> my $sth = $dbh->prepare(${query});
>> $sth->execute;
>> 
>> The problem is the sp_password generates a message:
>> "Password correctly set." which seems to upset the Web Page as all I
>> get is a CGI Error
>
>Take a look at the syb_err_handler attribute. The problem is that the
>sp_password proc generates a PRINT statement, which is sent to stdout
>by default.
>
>By using an ad-hoc error handler you can redirect that message to the 
>server error log, or ignore it completely.
>A PRINT statement is sent back to the client's error handler with an
>error message number of 0, so you can test on that condition.
>
>Michael
Michael,
Thanks, I've made some changes to the error routines, I'd started off
playing with the showplan stuff but I just stripped it back to
individual error message numbers and resolved the issue.

At this point I'm not 100% sure of which change resolved the issue.
But it is now working okay.


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

Date: Thu, 09 Sep 2004 21:16:25 GMT
From: antroy <news@ant-roy.co.uk>
Subject: Re: web services...
Message-Id: <JK30d.251$Eg5.35@newsfe4-gui.ntli.net>

Prasad Gadgil wrote:

> hi,
> 
> Web services is very interesting. How does one code this using perl?
> Any famous examples ?

Look up SOAP::Lite.

-- 
Ant...


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

Date: Thu, 09 Sep 2004 12:01:01 -0700
From: Jeff Shannon <jeff@ccvcorp.com>
Subject: Re: Xah Lee's Unixism
Message-Id: <10k1a13rnpc2p94@corp.supernews.com>

jmfbahciv@aol.com wrote:

>In article <10juvnrt88k4868@corp.supernews.com>,
>   Jeff Shannon <jeff@ccvcorp.com> wrote:
>  
>
>>
>>Here there's a lot of room to disagree -- it's a tragedy when U.S. 
>>citizens are killed, but it's an even greater tragedy when the entirety 
>>of the U.S. loses its freedoms in the name of "security".
>>    
>>
>
>Okay, that's it!  Tell me what freedoms you have lost.  Be specific.
>No sound bytes and no rhetoric parroting allowed.
>
>I really want to know.  People keep saying this but never say which
>freedoms have been lost.
>  
>

I've lost the freedom to read whatever books I want, without the 
government snooping over my shoulder. 

I've lost what little was left of the freedom to presume that the 
government isn't listening to my phone calls and scanning my email.  
(This particular freedom has been being eroded for decades, but the 
Patriot Act is pretty much the final nail in the coffin.)

I've lost the freedom from the assumption that, if I read certain books 
and speak of believing in certain principles, I'm not necessarily going 
to act in a criminal manner to further those principles.  (If I loudly 
proclaim that the government is horribly wrong, and I also happen to buy 
a copy of something like, say, The Anarchist's Cookbook... I'm now 
liable to be perceived by the government as a terrorist, and thus be 
subject to arrest and imprisonment with no charges being filed and no 
access to legal recourse.  It doesn't matter whether the government can 
*prove* that I planned anything, or even if I can prove that I have no 
such plans -- there's no opportunity for me to offer or dispute evidence.)

I have a good friend who's a (European) immigrant.  It is now legal for 
the government to detain her for any length of time they so desire, 
without giving any reason more definite than "suspected involvement in 
terrorism" -- and with *no* need to provide any evidence to back that 
claim.  Whether it's been done or not is irrelevant -- she's very much 
aware of the feeling that, despite the fact that she's been living and 
working in the US for most of her adult life, the mere fact that she's 
not "American" makes her immediately suspect, and potentially subject to 
being "disappeared".  Trusting to the goodwill and honesty of the 
government to *not* use its authority is, to say the least, not exactly 
heartening.

Most importantly, I've lost the freedom to live my life *without* 
feeling quite so much like Big Brother is just waiting for me to make a 
mistake, so that the rest of the US can be "saved" from terrorism.

(I've said my piece, but I don't expect we're likely to ever reach an 
agreement.  So, especially considering that I don't feel that 
comp.lang.* is really an appropriate place for political discussion, I 
won't be commenting further in this subthread.)

Jeff Shannon
Technician/Programmer
Credit International



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

Date: Thu, 09 Sep 2004 19:41:01 GMT
From: CBFalconer <cbfalconer@yahoo.com>
Subject: Re: Xah Lee's Unixism
Message-Id: <41409A6B.E618952C@yahoo.com>

Chuck Dillon wrote:
> 
 ... snip ...
> 
> It's easy to say we *don't* need but not so easy to demonstrate. 
> You don't even offer a hand wave attempt at articulating an
> alternative. In the political world everything is subject to
> debate.  Taking the war to the middle east, increasing policing
> powers, increasing intelligence capabilities...  But in the real
> world there is a huge threat and action must be taken.

Must it?  I am not claiming that it must not, but that the matter
deserves more thought than a panic reaction.  The very first thing
to settle should be the objectives.  Then the means and costs of
achieving such can be considered.

-- 
"Churchill and Bush can both be considered wartime leaders, just
 as Secretariat and Mr Ed were both horses." -     James Rhodes.
"We have always known that heedless self-interest was bad
 morals.  We now know that it is bad economics" -         FDR




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

Date: Thu, 09 Sep 2004 19:41:04 GMT
From: CBFalconer <cbfalconer@yahoo.com>
Subject: Re: Xah Lee's Unixism
Message-Id: <4140A424.DC2AD365@yahoo.com>

jmfbahciv@aol.com wrote:
> CBFalconer <cbfalconer@yahoo.com> wrote:
>
 ... snip ...
>>
>> There is no need, nor cause, to impute Bush & Co. with
>> intrinsically evil intentions.  It is quite enough to point to
>> their lack of capability, and bull headed 'revenge for daddy'
>> propensities.  The state of the economy, unemployment, poverty
>> rate, medical care, deficit, death rate in Iraq (both of Americans
>> and Iraqis), abandonment of the Bin Laden hunt, abridgement of
>> civil liberties (as in the Patriot Act and the Gitmo gulag), poor
>> choice of companions (Halliburton and other political donors and
>> trough feeders, and the 'plausible deniability' of the Swiftboat
>> gang), irritation of allies, inability to deal with North Korea
>> (due to involvement with useless adventures), abandonment of
>> efforts towards a Palestinian peace, all spring to immediate mind.
> 
> Well, your Bush-hater campaign is working beyond all your
> expectations.  One day, you will have to live it.

But the point is that most people neither love nor hate Bush. 
They hate his misguided and thoughtless actions.  The comics love
him, as he provides so many ridiculous quotes.  The wealthy love
him, as he transfers taxes from them to the middle class and the
poor.  Bin Laden loves him, as he provides manna for his rabble
rousing.  The NRA loves him, as he blocks any renewal of gun
laws.  Halliburton loves him.

>>
>> Yes, we have had no experience with a Kerry administration,
> 
> OH, fuckmeverymuch.  I am in Mass.  We do have some
> experience of a Kerry administration.  For those you who don't,
> watch how he runs his campaign.  He will run the country in the
> same manner.

No, you have experience of a Senate career.  The famous war votes
show that he is responsible, since he voted for a bill that
provided for financing, and against a modified bill that simply
ran up the deficit.  At the time very few knew that the alleged
Sadamian sins were largely pipe dreams, that the hunt for the 9/11
perpetrators was to be discarded, and that no preparation for the
results was to be made.  His major error was in placing some trust
in the Bush administration.  The post Viet Nam episodes show that
he has a functioning conscience.  Some people learn from their
mistakes.

Bush is a much different thing.  With him you had experience of a
Governorship in a state that almost totally emasculates the power
of a Governor, apart from the ability to sign death warrants and
deny mercy.  We have seen the ugly result of giving him some
power, as I partially enumerated above.

> 
>> .. but we
>> have had far too much experience with a Bush administration.
> 
 ... snip adhominem garbage ...
> Things can be worse..a lot worse.

True. But those candidates aren't running for President this time.

-- 
"Churchill and Bush can both be considered wartime leaders, just
 as Secretariat and Mr Ed were both horses." -     James Rhodes.
"We have always known that heedless self-interest was bad
 morals.  We now know that it is bad economics" -         FDR




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

Date: Thu, 09 Sep 2004 19:41:05 GMT
From: CBFalconer <cbfalconer@yahoo.com>
Subject: Re: Xah Lee's Unixism
Message-Id: <4140A885.90B945AC@yahoo.com>

Morten Reistad wrote:
> 
 ... snip ...
> 
> A lack of focus on world politics has been a characteristica of
> the US presidents since Eisenhower. Bush is not special, he just
> got the mess in his lap and had to deal with it; just as Nixon
> inherited the Vietnam war.

That is understandable considering the relative sizes of the US
GDP and the rest of the world (until recently), the isolationist
ethic between the wars, and such things as the world attitude that
Spain was much more then the US could bite off in 1898.  Wilson,
Roosevelt (both), Truman, Kennedy, Carter, Clinton, Nixon are
among the counter-examples.  Even Reagan, while a sad example of
domestic policy, did fairly well in the foreign affairs
department.  Elephants do not need to pay too much attention to
the surrounding fauna.

However Bush is demonstrably poor.  He ignored the warnings from
the CIA, FBI, outgoing Clinton administration about imminent
attacks.  He was focused on attacking Saddam and Iraq from the
first, and perverted 9/11 into that at the earliest opportunity. 
He has offended many more than most of his predecessors.  I will
say that he seems to have learned the names of some foreign
leaders since being elected.

-- 
"Churchill and Bush can both be considered wartime leaders, just
 as Secretariat and Mr Ed were both horses." -     James Rhodes.
"We have always known that heedless self-interest was bad
 morals.  We now know that it is bad economics" -         FDR




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

Date: Thu, 09 Sep 2004 23:06:57 +0200
From: "John Thingstad" <john.thingstad@chello.no>
Subject: Re: Xah Lee's Unixism
Message-Id: <opsd2vlvy7pqzri1@mjolner.upc.no>

On Thu, 09 Sep 04 13:12:17 GMT, <jmfbahciv@aol.com> wrote:


> I really want to know.  People keep saying this but never say which
> freedoms have been lost.
>

Since this is somewhat related to computer programming and AI I will reply.

The US has started a initiative to integrate all information about people  
in the USA into a central database.

This includes confidential information like your medical files. Think what  
you say to your psychologist is confidential? Think again. Being paranoid  
can be enough to get a "red flag".
They will have access to all your credit records and will monitor all your  
travels in and out of the country.
If you buy flowers on the apposite side of town they can deduce that you  
have a lover and
use this as a means of distortion. (Edgar A. Hoover style)

Initially this was just supposed to be used to monitor terrorist like  
behaviour
but now the FBI and CIA are also seeing the power of such a system.

The main challenge in computing is sieving through the amount of data.
Politically it is to pressure the foreign governments to wave their  
privacy protection acts and allow unlimited access to information to a  
foreign power.

Don't know what you think of this but it scares the hell out of me!

-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/


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

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


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