[29223] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 467 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue May 29 21:10:02 2007

Date: Tue, 29 May 2007 18:09:11 -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           Tue, 29 May 2007     Volume: 11 Number: 467

Today's topics:
        Annocpan down kallestad@gmail.com
    Re: Beyond Inside-Out <abigail@abigail.be>
    Re: Does anyone have experience in how to handle signal <needpassion@gmail.com>
    Re: duplicates <bik.mido@tiscalinet.it>
    Re: duplicates <baxter.brad@gmail.com>
    Re: duplicates <b-patton@ti.com>
        encode UTF8 -> MIME <calvin.chan.cch@gmail.com>
        How do I read a GZipped UTF-8 file from Perl on Windows <combustion@gmail.com>
        login example precode@comcast.net
        login example precode@comcast.net
    Re: PostgreSQL database access <spamtrap@dot-app.org>
    Re: PostgreSQL database access <justin.0704@purestblue.com>
    Re: PostgreSQL database access <ts@dionic.net>
    Re: PostgreSQL database access <ts@dionic.net>
    Re: PostgreSQL database access <spamtrap@dot-app.org>
    Re: SendMail.pm: smtp and gmail Davidcollins001@gmail.com
        strange error in cgi script using sendmail <sstark@us.ibm.com>
    Re: strange error in cgi script using sendmail <thepoet_nospam@arcor.de>
    Re: strange error in cgi script using sendmail <sstark@us.ibm.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 29 May 2007 15:54:26 -0700
From: kallestad@gmail.com
Subject: Annocpan down
Message-Id: <1180479266.590337.201830@n15g2000prd.googlegroups.com>

Annocpan has been down for a few days now.  Does anybody have an idea
of when it will be back up?  or if it will be back up?

Thanks,
Steve

http://www.stevekallestad.com/



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

Date: 30 May 2007 01:05:51 GMT
From: Abigail <abigail@abigail.be>
Subject: Re: Beyond Inside-Out
Message-Id: <slrnf5pje0.djq.abigail@alexandra.abigail.be>

anno4000@radom.zrz.tu-berlin.de (anno4000@radom.zrz.tu-berlin.de) wrote
on M September MCMXCIII in <URL:news:5c3amnF2te5gtU1@mid.dfncis.de>:
//  Dr.Ruud <rvtol+news@isolution.nl> wrote in comp.lang.perl.misc:
// > anno4000@radom.zrz.tu-berlin.de schreef:
// > 
// > > Unlike inside-out classes, Alter-based classes don't need extra
// > > support for garbage collection and thread cloning.  Like inside-
// > > out, they do need help in serialization.  The standard modules
// > > Data::Dumper and Storable don't do anything for them.
// > 
// > "not anything" is too little, because both have hooks for integration
// > with classes.
//  
//  Oh yes, but the hooks must be supplied.  If you give an inside-out
//  object to Data::Dumper, without help it will dump an undefined blessed
//  scalar: "bless( do{\(my $o = undef)}, 'SomeClass' )".  The same goes
//  for Alter-based classes.
//  
//  A difference is that with inside-out classes, essentially every class
//  must provide the hooks individually.  Only the class knows which
//  object fields need to be dumped.  With Alter-based classes, there is
//  the possibility of general methods to handle dumping, thawing and
//  freezing, that work with all objects and can be inherited or imported.


That's not true. You can quite easily write a generic function that
provides the hook; said function can be exported.

Just define your attributes as:

    our @ATTRIBUTES = \my (
        %attr1,
        %attr2,
        ...
    );


and your exported hook can access the attributes without any problems.


(This remarks is about Inside-Out Objects, I don't know whether that's
 true for Alter based objects).


The fact remains is that you need to do some work - but that's to be
expected. Inside-Out Objects is a technique to provide encapsulation.
Serialization as done with Data::Dumper and other standard modules use
by default a technique that only works in the absense of encapsulation.

With strong encapsulation, serialization is not possible. (Because the
serialized object is by definition not encapsulated - it can be modified
and fed back to the object).


Abigail
-- 
               split // => '"';
${"@_"} = "/"; split // => eval join "+" => 1 .. 7;
*{"@_"} = sub {foreach (sort keys %_)  {print "$_ $_{$_} "}};
%{"@_"} = %_ = (Just => another => Perl => Hacker); &{%{%_}};


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

Date: 29 May 2007 16:13:48 -0700
From: mike <needpassion@gmail.com>
Subject: Re: Does anyone have experience in how to handle signals in threaded program? Many thanks.
Message-Id: <1180480428.199126.230940@i38g2000prf.googlegroups.com>

Thanks a lot first for your reply.
Regarding your words "Because the thread that got the signal did not
have a sig handler in place.", I defined signal handler in thread in
sample2.pl, how come the signal was not captured? Maybe there are some
other ways to define signal handler and capture signal in thread.



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

Date: Tue, 29 May 2007 22:08:39 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: duplicates
Message-Id: <712p53d2kn6l3g3vutfemi4nm7rp2gl1hg@4ax.com>

On Tue, 29 May 2007 11:38:42 -0700, Jim Gibson
<jgibson@mail.arc.nasa.gov> wrote:

>Here's a fish:

What's of the elitist clpmisc attitude? ;-)


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: 29 May 2007 13:30:01 -0700
From: Brad Baxter <baxter.brad@gmail.com>
Subject: Re: duplicates
Message-Id: <1180470601.112223.194180@q75g2000hsh.googlegroups.com>

On May 29, 4:08 pm, Michele Dondi <bik.m...@tiscalinet.it> wrote:
> On Tue, 29 May 2007 11:38:42 -0700, Jim Gibson
>
> <jgib...@mail.arc.nasa.gov> wrote:
> >Here's a fish:
>
> What's of the elitist clpmisc attitude? ;-)

s/of/with/;
  -- elitist (alleged) English speaker

--
Brad



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

Date: Tue, 29 May 2007 13:27:20 -0500
From: "Billy N. Patton" <b-patton@ti.com>
Subject: Re: duplicates
Message-Id: <f3hra8$buo$1@home.itg.ti.com>

julia_2683@hotmail.com wrote:
> I would like to find and delete duplicates to reduce the number of
> entries I have for each word. Need your help to achieve that.
> Input
> dog -> doggy
> dog -> dogs
> want -> wants
> want -> wanting
> want -> wanted
> eat -> eaten
> eat -> eating
> eat -> eated
> output
> dog -> doggy dogs
> want -> wants wanting wanted.
> 
> Thanks
> 
put into a hash
if exists
   $hash{dog} .= " dogs";


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

Date: 29 May 2007 17:00:25 -0700
From: cc96ai <calvin.chan.cch@gmail.com>
Subject: encode UTF8 -> MIME
Message-Id: <1180483225.415971.63350@k79g2000hse.googlegroups.com>

I got UTF8 value %C3%A9
how could I encode it become =E9 ?

I try encode_base64 , but no luck
maybe I miss some, anyone have idea ?



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

Date: 29 May 2007 13:24:41 -0700
From: DmitryB <combustion@gmail.com>
Subject: How do I read a GZipped UTF-8 file from Perl on Windows?
Message-Id: <1180470281.401711.131940@z28g2000prd.googlegroups.com>

Hi, folks,

I'm looking for a way to read and write *.gz text files in UTF8
encoding on windows (ActivePerl, gzip Perl::IO layer is not
available). I've tried naive IO::Zlib stuff like this:

tie *OUTPUTFILE, "IO::Zlib", $outputFile, "wb" or die "Could not open
$outputFile for reading";
binmode(OUTPUTFILE, ":utf8");

Unfortunately this doesn't work, the error is:

"Not a GLOB reference at c:/bin/perl/lib/IO/Zlib.pm line 566."


Basically, the goal is to layer utf8 on top of zlib or achieve a
similar result using other means. Again, keep in mind, I can't just
say "gzip" in open() because that's not available.

Does anyone have any pointers?

Thanks.



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

Date: 29 May 2007 15:13:24 -0700
From: precode@comcast.net
Subject: login example
Message-Id: <1180476804.751083.6820@q19g2000prn.googlegroups.com>

Hello,

    I am trying to learn how to let visitors to create an account, and
then login and logout.

The problem I am having is that I cannot run perl on any of the free
hosting sites that I have.  So I have tried numerous times to redirect
the login through my Apache Server on xp-pro here, but when I try to
access my page from the internet elsewhere (besides home) I cannot
connect.

   My address is http://apache.dvrdns.org and i'm sending the login to
http://apache.dvrdns.org/one.pl

The free hosting site is:  www.help101.bravehost.com

I have read numerous books and tried 4 different hosting site such as
tripod, Bravenet, I use comcast as my isp and comcast doesn't support
perl or cgi or php.

Is there a link for information on using perl to login with a free or
no money account where visiotrs to a site can register and access the
internet without a fee

Thank you

idunno



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

Date: 29 May 2007 15:54:50 -0700
From: precode@comcast.net
Subject: login example
Message-Id: <1180476730.252026.49610@o11g2000prd.googlegroups.com>

Hello,

    I am trying to learn how to let visitors to create an account, and
then login and logout.

The problem I am having is that I cannot run perl on any of the free
hosting sites that I have.  So I have tried numerous times to redirect
the login through my Apache Server on xp-pro here, but when I try to
access my page from the internet elsewhere (besides home) I cannot
connect.

   My address is http://apache.dvrdns.org and i'm sending the login to
http://apache.dvrdns.org/one.pl

The free hosting site is:  www.help101.bravehost.com

I have read numerous books and tried 4 different hosting site such as
tripod, Bravenet, I use comcast as my isp and comcast doesn't support
perl or cgi or php.

Is there a link for information on using perl to login with a free or
no money account where visiotrs to a site can register and access the
internet without a fee

Thank you

idunno



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

Date: Tue, 29 May 2007 16:15:54 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: PostgreSQL database access
Message-Id: <m2myznfksl.fsf@local.wv-www.com>

Tim Southerwood <ts@dionic.net> writes:

> Justin C wrote:
>
>> I've a PostgreSQL database that I need to interact with using perl. I
>> need to be able to add records and amend records only. I'm trying to
>> find where to start. Searching CPAN for PostgreSQL returns a large list
>> of modules
>
> Fortunately, there is only one sane answer:
>
> DBI as the interface module
>
> and DBD::Pg as the driver

I suspect that virtually all of the other modules found are high-level
tools that build atop those two, and happen to mention in their docs that
they've been "tested against MySQL and PostgreSQL" or some such.

Maybe CPAN should take dependencies into account when sorting its search
results, sort of like how Google takes links into account. That way, for
situations such as this one where you have a very popular base module that
many others use, the base module would be listed first.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: Tue, 29 May 2007 20:26:07 -0000
From: Justin C <justin.0704@purestblue.com>
Subject: Re: PostgreSQL database access
Message-Id: <slrnf5p336.ieh.justin.0704@satori.local>

In article <f3i7kj.148.1@news.isolution.nl>, Dr.Ruud wrote:
> Justin C schreef:
>> I've a PostgreSQL database that I need to interact with using perl. 
>> I need to be able to add records and amend records only.
> 
> Consider DBIx::Simple 
> http://search.cpan.org/perldoc?DBIx::Simple 

I have to say, that does look much more simple. And, being a complete database dunce, this could be easier for achieving what I want.

I'll compare the documentation tomorrow at work. Thank you.

	Justin.

-- 
Justin C, by the sea.


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

Date: Tue, 29 May 2007 22:16:31 +0100
From: Tim S <ts@dionic.net>
Subject: Re: PostgreSQL database access
Message-Id: <465c982f$0$646$5a6aecb4@news.aaisp.net.uk>

Sherm Pendley wrote:

> Tim Southerwood <ts@dionic.net> writes:
> 
>> Justin C wrote:
>>
>>> I've a PostgreSQL database that I need to interact with using perl. I
>>> need to be able to add records and amend records only. I'm trying to
>>> find where to start. Searching CPAN for PostgreSQL returns a large list
>>> of modules
>>
>> Fortunately, there is only one sane answer:
>>
>> DBI as the interface module
>>
>> and DBD::Pg as the driver
> 
> I suspect that virtually all of the other modules found are high-level
> tools that build atop those two, and happen to mention in their docs that
> they've been "tested against MySQL and PostgreSQL" or some such.

Must admit I've never really considered anything else. DBI gives me the
control I want with as much or as little complexity as I wish. IMHO, DBI is
probably one of the most complete and professionally written modules in the
whole of CPAN. It meshes with RDBMS's in a way which is natural.

I have noticed the odd attempt to OO-ify DB access, but I've not really seen
the point (and I like OO sometimes).

Just my 2p's worth :)

Cheers

Tim


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

Date: Tue, 29 May 2007 22:26:26 +0100
From: Tim S <ts@dionic.net>
Subject: Re: PostgreSQL database access
Message-Id: <465c9a82$0$646$5a6aecb4@news.aaisp.net.uk>

Tim S wrote:

> I have noticed the odd attempt to OO-ify DB access, but I've not really
> seen the point (and I like OO sometimes).

That sounded stoopid in retrospect - DBI could be argued to have OO like
calling semantics - though I tend to think of it as a "handle" not an
object, hence I don't really think of it as an OO module in the purist
sense, but that's debateable. 

I was referring to some Class:: modules, and whilst not wanting to offend
the authors of these other probably very worthy modules, well, for me, I
find all I need in DBI and have never thought it needed anything layered or
added.

I'll go to bed now :)

Cheers

Tim


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

Date: Tue, 29 May 2007 17:46:10 -0400
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: PostgreSQL database access
Message-Id: <m2646bfgm5.fsf@local.wv-www.com>

Tim S <ts@dionic.net> writes:

> I have noticed the odd attempt to OO-ify DB access, but I've not really seen
> the point (and I like OO sometimes).

I think it depends on where your focus is.

If you're focused on the database query and know SQL well, then an additional
OO layer on top of that can be a hindrance.

On the other hand, if your focus is on other parts of the application, and all
you want from the database is an object persistence layer, then the OO layers
are a big help.

Of course, the focus can and does vary from script to script, so there's room
for both approaches.

sherm--

-- 
Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net


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

Date: 29 May 2007 14:20:41 -0700
From: Davidcollins001@gmail.com
Subject: Re: SendMail.pm: smtp and gmail
Message-Id: <1180473641.283814.77510@m36g2000hse.googlegroups.com>

Thankyou, I usually google quite well. I had found the net modules but
didn't realise I could use them for this purpose. Here come automated
email backups for my docs!

:)



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

Date: 29 May 2007 13:36:45 -0700
From: sstark <sstark@us.ibm.com>
Subject: strange error in cgi script using sendmail
Message-Id: <1180471005.034151.103170@g4g2000hsf.googlegroups.com>

Recently I started receiving the following error in my CGI scripts,
which contain a sendmail call:

prog_map_lookup(scriptfilter): child died on signal 25

These scripts have been running fine for years and suddenly this
started happening. The bottom line, of course, is that I get an
Internal Server Error every time someone tries to use one of the
scripts from a web browser. Any idea what this error means?

Here's a typical snippet from one of my scripts that is suddenly
producing this error.

 open(MAIL, "|/usr/sbin/sendmail -t $mailto")
  || on_error("Can't open mail program.");
 print MAIL "To: $mailto\n";
 print MAIL "From: Tester McProblem <$mailfrom>\n";
 print MAIL "Subject: email test\n\n";

 print MAIL "\nBody of test message\n";

 close(MAIL);

Any help would be greatly appreciated.

Scott Stark



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

Date: Tue, 29 May 2007 00:10:32 +0200
From: Christian Winter <thepoet_nospam@arcor.de>
Subject: Re: strange error in cgi script using sendmail
Message-Id: <465ca2c9$0$23136$9b4e6d93@newsspool1.arcor-online.net>

sstark wrote:
> Recently I started receiving the following error in my CGI scripts,
> which contain a sendmail call:
> 
> prog_map_lookup(scriptfilter): child died on signal 25
> 
> These scripts have been running fine for years and suddenly this
> started happening. The bottom line, of course, is that I get an
> Internal Server Error every time someone tries to use one of the
> scripts from a web browser. Any idea what this error means?
> 
> Here's a typical snippet from one of my scripts that is suddenly
> producing this error.
> 
>  open(MAIL, "|/usr/sbin/sendmail -t $mailto")
>   || on_error("Can't open mail program.");
>  print MAIL "To: $mailto\n";
>  print MAIL "From: Tester McProblem <$mailfrom>\n";
>  print MAIL "Subject: email test\n\n";
> 
>  print MAIL "\nBody of test message\n";
> 
>  close(MAIL);
> 
> Any help would be greatly appreciated.

Signal 25 means SIGXFSZ, File Size Exceeded. In this case the
call to sendmail fails because to complete it would need to
grow a file that has already reached the maximum size allowed by
ulimit. However, the problem isn't related to Perl, it's somewhere
in the sendmail/os interaction.

-Chris


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

Date: 29 May 2007 17:22:10 -0700
From: sstark <sstark@us.ibm.com>
Subject: Re: strange error in cgi script using sendmail
Message-Id: <1180484530.311219.97270@p77g2000hsh.googlegroups.com>

Thanks for the explanation Chris! That's very helpful knowing it's
some error with my ISP.

Scott

On May 28, 3:10 pm, Christian Winter <thepoet_nos...@arcor.de> wrote:
>
> Signal 25 means SIGXFSZ, File Size Exceeded. In this case the
> call to sendmail fails because to complete it would need to
> grow a file that has already reached the maximum size allowed by
> ulimit. However, the problem isn't related to Perl, it's somewhere
> in the sendmail/os interaction.
>
> -Chris- Hide quoted text -
>
> - Show quoted text -




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

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


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