[24521] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6701 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 17 14:06:44 2004

Date: Thu, 17 Jun 2004 11:05:07 -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, 17 Jun 2004     Volume: 10 Number: 6701

Today's topics:
    Re: [Qs] re "Abigails Coding Guidelines" <nospam-abuse@ilyaz.org>
    Re: [Qs] re "Abigails Coding Guidelines" <tzz@lifelogs.com>
    Re: instance of class into sub? <98734@mail.muni.cz>
    Re: instance of class into sub? <98734@mail.muni.cz>
    Re: instance of class into sub? <tore@aursand.no>
    Re: instance of class into sub? <ittyspam@yahoo.com>
    Re: instance of class into sub? <ittyspam@yahoo.com>
        Net::SMTP problem <bob.lockie.NOSPAM@mail.com>
    Re: Net::SMTP problem <ittyspam@yahoo.com>
    Re: Net::SMTP problem <andre.wisniewski@gmx.de>
    Re: Net::SMTP problem <bob.lockie.NOSPAM@mail.com>
    Re: Net::SMTP problem <andre.wisniewski@gmx.de>
        pattern match problem <nospam@peng.nl>
    Re: pattern match problem <nobull@mail.com>
    Re: pattern match problem <odyniec-usenet@odyniec.net>
    Re: random underslashes and single regex <pinyaj@rpi.edu>
    Re: random underslashes and single regex (Bill)
    Re: SSH problem <nobull@mail.com>
        Structure of complex distributions <socyl@987jk.com>
    Re: Win32::OLE->GetObject doesn't work on WinXP? <ceo@nospan.on.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 17 Jun 2004 13:29:03 +0000 (UTC)
From:  Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: [Qs] re "Abigails Coding Guidelines"
Message-Id: <cas6av$qg8$1@agate.berkeley.edu>

[A complimentary Cc of this posting was sent to
Ben Morrow 
<usenet@morrow.me.uk>], who wrote in article <capq17$s36$1@wisteria.csv.warwick.ac.uk>:
> > I do not remember this problem to be ever fixed.
> 
> Do 5.8's safe signals not fix this?

Yes, I forgot that 5.8 introduced "unreliable signals".  In this mode
(default?) there is no guarantie that a signal will be handled.
However, if it *is* handled, the above mentioned bug should not be
triggered.

Since this semantic is not generally acceptable, I do not consider
this as a solution.

Hope this helps,
Ilya


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

Date: Thu, 17 Jun 2004 13:19:10 -0400
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: Re: [Qs] re "Abigails Coding Guidelines"
Message-Id: <4n7ju6cdbl.fsf@lifelogs.com>

On Mon, 14 Jun 2004, jkrugman345@yahbitoo.com wrote:

> * Guideline 3 says "All system calls should be checked,
>   including, but not limited to, close, seek, flock, fork and exec."
> 
>   Is there a comprehensive list of *all* of Perl's system calls?

No, but I highly recommend the Stevens "Advanced Programming in the
UNIX Environment" book to learn about the Unix system calls and much
more.  You'll become a better Perl programmer after reading that
book, although it uses C for the examples.

Ted


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

Date: Thu, 17 Jun 2004 15:44:30 GMT
From: gep <98734@mail.muni.cz>
Subject: Re: instance of class into sub?
Message-Id: <HzGME7.Etp@news.muni.cz>

Eric Bohlman wrote:
> Paul Lalli <ittyspam@yahoo.com> wrote in
> news:20040617065025.W20623@dishwasher.cs.rpi.edu: 
> 
> 
>>No one's complaining that you sent to 2 different newsgroups.  They're
>>complaining about the *method* in which you did so.  The method you
>>used is called "multi-posting".  This means sending one message to one
>>group, and then sending a copy of that message to another group.  This
>>is considered rude.  The reason is that many people use mail readers
>>which download messages from multiple groups at a time.  Because of
>>what you did, they saw your message twice for no reason.
> 
> 
> Actually, that's one of the smaller parts of the reason.  The biggest part 
> of the reason is that someone reading the followups to a multi-posted 
> message has to read several groups, not just one, in order to see them all.  
> If, say, a message is multi-posted to comp.lang.perl.misc and 
> comp.lang.perl.modules (as the original was), then someone reading 
> c.l.p.misc won't see any of the responses in c.l.p.modules, at least not 
> until he reads the latter group (if he in fact does).
> 
> Why is that rude?  Because the person reading c.l.p.misc might very well 
> take the time to post a response and then, upon going to c.l.p.modules, 
> discover that someone else posted essentially the same response there.  So 
> the first person has wasted his time answering a question that's already 
> been answered.  If the message had been crossposted, he'd have quickly seen 
> that the question had already been answered and not bothered to post a 
> redundant response.
I dont think so, because he will help people, who read only one of the 
newsgs. The same situation could appear, when somebody writes sth. and 
then he posts it and then he finds out, that the same answer is there 
yet, because sb else...
> 
> Multi-posting fragments threads that should be kept together, leading to 
> duplication of effort and in many cases inadequate peer review of 
> responses.


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

Date: Thu, 17 Jun 2004 15:39:29 GMT
From: gep <98734@mail.muni.cz>
Subject: Re: instance of class into sub?
Message-Id: <HzGM5u.ECw@news.muni.cz>

Paul Lalli wrote:
> On Thu, 17 Jun 2004, gep wrote:
> 
> 
>>Gunnar Hjalmarsson wrote:
>>
>>>Paul Lalli wrote in comp.lang.perl.misc:
>>>
>>>
>>>>Please read the posting guidelines that are posted to this group
>>>>once a week.  They will tell you to post complete but short scripts
>>>>that illustrate your problem, and to copy and paste your code,
>>>>rather than retype it.
>>>
>>>
>>>And to not multi-post.
>>>
>>
>>I sent it to 2 different newsgroups, it's ok, i think. No, i know it.
>>
> 
> 
> No one's complaining that you sent to 2 different newsgroups.  They're
> complaining about the *method* in which you did so.  The method you used
> is called "multi-posting".  This means sending one message to one group,
> and then sending a copy of that message to another group.  This is
> considered rude.  The reason is that many people use mail readers which
> download messages from multiple groups at a time.  Because of what you
  		  ^^^^^^^^^^^^^^^^^ and what? i do so too.
> did, they saw your message twice for no reason.
But there was a reason. Not all the people read both newsgroups and 
because i want to know more about it and receive answer fro mmore 
people, i posted it into 2 diff groups (not 2, but 4 i think). If u 
can't understand it, its only your problem, not mine.
> 
> The correct method is called "cross-posting".  This means sending one
> message to both groups.  This is usually done by specifiying both groups
> on the "Newsgrps:" header (analagous to To: in emails), separated by
> commas.  Using this method, your message will be sent to both groups, with
> the same message id.  Mail readers will recognize the same id, and only
> download the message once.  This saves time, bandwidth, and effort on all
> concerned.
> 
> Please do a google search for "multipost crosspost" and you'll see several
> references to the topic.  Please also check out the posting guidelines I
> mentioned previously.
> 
> Thank you,
> Paul Lalli


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

Date: Thu, 17 Jun 2004 18:05:36 +0200
From: Tore Aursand <tore@aursand.no>
Subject: Re: instance of class into sub?
Message-Id: <pan.2004.06.17.16.05.20.444235@aursand.no>

On Thu, 17 Jun 2004 15:39:29 +0000, gep wrote:
>> No one's complaining that you sent to 2 different newsgroups.  They're
>> complaining about the *method* in which you did so.  The method you
>> used is called "multi-posting".  This means sending one message to one
>> group, and then sending a copy of that message to another group.  This
>> is considered rude.  The reason is that many people use mail readers
>> which download messages from multiple groups at a time.  Because of
>> what you did, they saw your message twice for no reason.

> But there was a reason. Not all the people read both newsgroups and
> because i want to know more about it and receive answer fro mmore
> people, i posted it into 2 diff groups (not 2, but 4 i think). If u
> can't understand it, its only your problem, not mine.

Listen:  It's _you_ who doesn't understand the important difference
between 'multiposting' and 'crossposting'.  _Do_ you know the difference
or not?

Please read Paul's answer to understand the difference (quoted in this
post, as well).


-- 
Tore Aursand <tore@aursand.no>
"War is too serious a matter to entrust to military men." (Georges
 Clemenceau)


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

Date: Thu, 17 Jun 2004 12:55:09 -0400
From: Paul Lalli <ittyspam@yahoo.com>
Subject: Re: instance of class into sub?
Message-Id: <20040617125213.S20623@dishwasher.cs.rpi.edu>

On Thu, 17 Jun 2004, gep wrote:

> Eric Bohlman wrote:

> > Why is that rude?  Because the person reading c.l.p.misc might very well
> > take the time to post a response and then, upon going to c.l.p.modules,
> > discover that someone else posted essentially the same response there.  So
> > the first person has wasted his time answering a question that's already
> > been answered.  If the message had been crossposted, he'd have quickly seen
> > that the question had already been answered and not bothered to post a
> > redundant response.
> I dont think so, because he will help people, who read only one of the
> newsgs. The same situation could appear, when somebody writes sth. and
> then he posts it and then he finds out, that the same answer is there
> yet, because sb else...


You're still not getting this.  Go read my original reply again.  We're
not telling you not to post to more than one group.  We're telling you to
send ONE message to BOTH groups, rather than TWO messages, one to EACH
group.  Do you see the difference?  Using the method we're telling you,
anyone who reads only one of the groups (like me) will still see the
message.  And as Eric pointed out, when you use this method, I will be
able to see that the message was sent to both groups, even though I'm only
reading one.  Therefore when I reply, my answer can go to both groups too,
rather than only one group.  That way everyone can see it.

Do you understand yet?

Paul Lalli







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

Date: Thu, 17 Jun 2004 12:57:20 -0400
From: Paul Lalli <ittyspam@yahoo.com>
Subject: Re: instance of class into sub?
Message-Id: <20040617125523.J20623@dishwasher.cs.rpi.edu>

On Thu, 17 Jun 2004, gep wrote:

> Paul Lalli wrote:
> >
> > No one's complaining that you sent to 2 different newsgroups.  They're
> > complaining about the *method* in which you did so.  The method you used
> > is called "multi-posting".  This means sending one message to one group,
> > and then sending a copy of that message to another group.  This is
> > considered rude.  The reason is that many people use mail readers which
> > download messages from multiple groups at a time.  Because of what you
>   		  ^^^^^^^^^^^^^^^^^ and what? i do so too.
> > did, they saw your message twice for no reason.
> But there was a reason. Not all the people read both newsgroups and
> because i want to know more about it and receive answer fro mmore
> people, i posted it into 2 diff groups (not 2, but 4 i think). If u
> can't understand it, its only your problem, not mine.

I very much disagree.  This is your problem, because if you choose to
continue to ignore the rather polite requests you are receiving to behave
appropriately in a news group, very few people will be willing to help you
in the future.  This is standard Usenet proticol.  If you don't want to
follow it, that's your choice.  But try to remember there is nothing
forcing anyone to help you or answer your questions.  If you don't want to
play by the rules, why should we spend our time to help you?

Paul Lalli


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

Date: Thu, 17 Jun 2004 13:01:13 -0400
From: Bob <bob.lockie.NOSPAM@mail.com>
Subject: Net::SMTP problem
Message-Id: <r7kAc.33010$nY.1037228@news20.bellglobal.com>

I'm getting a "450 <b2.ca>: User unknown" in the postfix log file.
I don't know where the 'b2.ca' came from it should be 'b2' or 
'b2@my.domain'.


     $smtp->mail( "b@my.domain" );
     $smtp->recipient( "b2@my.domain" );
     $msg_contents = "t";

     if (! $smtp->data( $msg_contents )) {
         print "Unable to send message " . $current . "\n";
     }

Does anybody know why it is failing and is there any way to see exactly 
what is being sent to the mail server?



-- 
-------------------------------------------------------
Remove .NOSPAM from my email address to reply directly.


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

Date: Thu, 17 Jun 2004 13:25:33 -0400
From: Paul Lalli <ittyspam@yahoo.com>
Subject: Re: Net::SMTP problem
Message-Id: <20040617132342.B20623@dishwasher.cs.rpi.edu>

On Thu, 17 Jun 2004, Bob wrote:

> I'm getting a "450 <b2.ca>: User unknown" in the postfix log file.
> I don't know where the 'b2.ca' came from it should be 'b2' or
> 'b2@my.domain'.
>
>
>      $smtp->mail( "b@my.domain" );
>      $smtp->recipient( "b2@my.domain" );
>      $msg_contents = "t";
>
>      if (! $smtp->data( $msg_contents )) {
>          print "Unable to send message " . $current . "\n";
>      }
>
> Does anybody know why it is failing and is there any way to see exactly
> what is being sent to the mail server?


Run your script with warnings enabled, and Perl will tell you exactly
what's wrong with the first two lines of this code.

(obligatory mini-rant follows)

It's not nice to ask thousands of people to do the work of a machine.
Your code should always have warnings enabled before being posted for all
the world to see and critique.  Please read the posting guidelines that
are posted to this group regularly.


Paul Lalli


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

Date: Thu, 17 Jun 2004 19:49:17 +0200
From: "Andre Wisniewski" <andre.wisniewski@gmx.de>
Subject: Re: Net::SMTP problem
Message-Id: <opr9q2gfy8udlqzq@ares>

>>
>>      $smtp->mail( "b@my.domain" );
>>      $smtp->recipient( "b2@my.domain" );
>>      $msg_contents = "t";
>>
>>      if (! $smtp->data( $msg_contents )) {
>>          print "Unable to send message " . $current . "\n";
>>      }
>>

> Run your script with warnings enabled, and Perl will tell you exactly
> what's wrong with the first two lines of this code.
>
>
> It's not nice to ask thousands of people to do the work of a machine.
> Your code should always have warnings enabled before being posted for all
> the world to see and critique.  Please read the posting guidelines that
> are posted to this group regularly.
>

Of course, Paul is right but try it with ... b\@my. ...

Read, learn and use.

-- 
Andre

---

Fighting for peace is like f..ing for virginity


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

Date: Thu, 17 Jun 2004 13:39:50 -0400
From: Bob <bob.lockie.NOSPAM@mail.com>
Subject: Re: Net::SMTP problem
Message-Id: <EHkAc.45162$7H1.1507598@news20.bellglobal.com>

>>Does anybody know why it is failing and is there any way to see exactly
>>what is being sent to the mail server?
> 
> 
> 
> Run your script with warnings enabled, and Perl will tell you exactly
> what's wrong with the first two lines of this code.

Ok, I turned on warnings:
     $smtp->mail( "b\@my.domain" );
     $smtp->recipient( "b2\@my.domain" );
     $msg_contents = "t";

Now it is a postfix question:
reject: RCPT from unknown[192.168.1.100]

-- 
-------------------------------------------------------
Remove .NOSPAM from my email address to reply directly.


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

Date: Thu, 17 Jun 2004 20:03:19 +0200
From: "Andre Wisniewski" <andre.wisniewski@gmx.de>
Subject: Re: Net::SMTP problem
Message-Id: <opr9q23tefudlqzq@ares>

>
> Now it is a postfix question:
> reject: RCPT from unknown[192.168.1.100]
>

Do not post such questions here!

-- 
Andre

---

Fighting for peace is like f..ing for virginity


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

Date: Thu, 17 Jun 2004 17:18:57 +0100
From: "Lex" <nospam@peng.nl>
Subject: pattern match problem
Message-Id: <3AjAc.279919$Rc.8257736@news-reader.eresmas.com>

Hi, I'm stuck with a pattern match thing.

What I actually want a script to do is the following:

look for <pre> and </pre> and erase all the <br> that you find within it, no
matter what you find. However: leave the rest! ( linebreaks etc.)

But I don't know how to do it properly.

I tried doing this:

in stead of:

----------------------------------------------------------------------------
----
 Code
----------------------------------------------------------------------------
----

$rec{'Text'} =~ s%<pre>(.*?)<br>(.*?)</pre>%<pre>$1 $2</pre>%gim;

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


I tried:
----------------------------------------------------------------------------
----
 Code
----------------------------------------------------------------------------
----

$rec{'Text'} =~ s%<pre>((.|\n)*?)<br>((.|\n)*?)</pre>%<pre>$1 $2</pre>%gim;

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


But that would just erase everything between <pre> and </pre> in the next
example:
----------------------------------------------------------------------------
----
 Code
----------------------------------------------------------------------------
----

<br><b>Medische reden WAO-uitkering, in percentages</b>
<br><pre>
                                     Turken  Marokkanen  Nederlanders
<br>Klachten aan het bewegingsapparaat  36      35          36
<br>Psychische klachten                 23      26          27
<br>Overig                              41      39          37
<br></pre>

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


(still studying 'programming perl')

If anybody has a good suggestion...
Thanks for your time reading this.

Lex




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

Date: 17 Jun 2004 18:30:49 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: pattern match problem
Message-Id: <u9vfhqdrcm.fsf@wcl-l.bham.ac.uk>

"Lex" <nospam@peng.nl> writes:

> Hi, I'm stuck with a pattern match thing.
> 
> What I actually want a script to do is the following:
> 
> look for <pre> and </pre> and erase all the <br> that you find within it, no
> matter what you find. However: leave the rest! ( linebreaks etc.)
> 
> But I don't know how to do it properly.

Use an HTML parser module.

> I tried doing this:
> 
> $rec{'Text'} =~ s%<pre>(.*?)<br>(.*?)</pre>%<pre>$1 $2</pre>%gim;

Do not attempt to process HTML using just regex - it simply isn't
worth the effort.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: 17 Jun 2004 19:59:24 +0200
From: Michal Wojciechowski <odyniec-usenet@odyniec.net>
Subject: Re: pattern match problem
Message-Id: <87wu262hhf.fsf@odyniec.odyniec.net>

"Lex" <nospam@peng.nl> writes:

[...]

> look for <pre> and </pre> and erase all the <br> that you find
> within it, no matter what you find. However: leave the rest! (
> linebreaks etc.)

[...]

> $rec{'Text'} =~ s%<pre>(.*?)<br>(.*?)</pre>%<pre>$1 $2</pre>%gim;

The above would work, if it could match overlapping occurrences. One
solution is to use it in a loop, like:

  while (s!<pre>(.*?)<br>(.*?)</pre>!<pre>$1 $2</pre>!sig) {}

HTH,
-- 
Michal Wojciechowski : for(<>){/\s/,$l{$m=$`}=$'}$_ : 10 PRINT "Yet another"
odyniec()odyniec;net : =$l{$c},/O\s/?$c=$'-1:y/"//d : 20 PRINT "Perl hacker"
 http://odyniec.net  : ,/T\s/?print$':0while$c++<$m : 30 GOTO 10


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

Date: Thu, 17 Jun 2004 10:52:23 -0400
From: Jeff 'japhy' Pinyan <pinyaj@rpi.edu>
Subject: Re: random underslashes and single regex
Message-Id: <Pine.SGI.3.96.1040617103436.321142A-100000@vcmr-64.server.rpi.edu>

On 16 Jun 2004, Anno Siegel wrote:

>Jeff 'japhy' Pinyan  <pinyaj@rpi.edu> wrote in comp.lang.perl.misc:
>> On 16 Jun 2004, Bill wrote:
>> 
>> >Anyone know of a _single regex_ for the following:
>> >
>> >Match a string which has a single '_' character placed at random
>> >within it. The string without the '_' is known, the position of the
>> >'_' is not known.
>> 
>> Do you mean you want to match strings that contain ONLY one underscore in
>> them?
>> 
>>   if (($str =~ tr/_//) == 1) { it's ok }
>> 
>> or
>> 
>>   if ($str =~ /\A[^_]*_[^_]*\z/) { it's ok }
>
>He wants, for a given string, a regex that matches exactly the strings
>that are obtained by inserting a single '_' into the string.

Hmm.  Well, the code following works for all the cases I can think of,
even if the $plain string has _'s in it already.

  $plain = "alphabet";
  $odd = "alphab_et";
  if ($odd =~ /^(.*)_(.*)\z(?(?{ "$1$2" ne $plain })(?!))/s) {
    print "'$odd' is '$plain' with an extra _ in it!\n";
  }

Here's the regex broken down:

  m{
    ^       # match the beginning of the string
    ( .* )  # match (and capture to $1) 0+ characters
    _       # match an underscore
    ( .* )  # match (and capture to $2) 0+ characters
    \z      # enforce that we are at the end of the string

    (
      ?(?{ "$1$2" ne $plain })  # if "$1$2" is not the same as $plain
      (?!)                      # then fail (don't match)
    )

    # otherwise, we matched successfully
  }xs

The /s modifier is so that . matches newlines.  The /x modifier is used to
allow whitespace and comments.

The regex can be made simpler if the $plain string will have no
underscores in it:

  m{
    ^       # match the beginning of the string

    (?=       # look-ahead:
      ( .* )  # match (and capture to $1) 0+ characters
      _       # match an underscore
      ( .* )  # match (and capture to $2) 0+ characters
    )

    (
      ?(?{ "$1$2" ne $plain })  # if "$1$2" is not the same as $plain
      (?!)                      # then fail (don't match)
    )

    # otherwise, we matched successfully
  }xs

This uses a look-ahead (although I could just have easily have used the
CUT assertion, (?>...), which won't backtrack internally.  Thus, I don't
need to ensure I'm at the end of the string, because $1 and $2 will only
EVER be set once.

But the first method is the more general one.

-- 
Jeff Pinyan         RPI Acacia Brother #734        RPI Acacia Corp Secretary
"And I vos head of Gestapo for ten     | Michael Palin (as Heinrich Bimmler)
 years.  Ah!  Five years!  Nein!  No!  | in: The North Minehead Bye-Election
 Oh.  Was NOT head of Gestapo AT ALL!" | (Monty Python's Flying Circus)



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

Date: 17 Jun 2004 09:21:46 -0700
From: wherrera@lynxview.com (Bill)
Subject: Re: random underslashes and single regex
Message-Id: <239ce42f.0406170821.e741fb1@posting.google.com>

Gunnar Hjalmarsson <noreply@gunnar.cc> wrote in message news:<2jcp83Fvb6bpU1@uni-berlin.de>...

> > 
> > It is for a mail filter: a spammer mutates the From by moving a _ 
> > character at random.
> 
> Aha, thanks, but I meant why are you anxious to do it in one
> statement? To me, using tr/// to remove it seems both more straight
> forward and more efficient.

Yes, probably, but the underlying program wants a list of regexp.

The replies I have seen tend to support a suspicion of mine: _regular_
expressions have problems dealing with even minor amounts of truly
_random_ variation. I guess that is probably due to the fact they deal
with regularities :).


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

Date: 17 Jun 2004 18:38:20 +0100
From: Brian McCauley <nobull@mail.com>
Subject: Re: SSH problem
Message-Id: <u9r7sedr03.fsf@wcl-l.bham.ac.uk>

dianne@dogmac.com (Dianne van Dulken) writes:

> Subject: SSH problem

There is no mention of SSH anywhere but in the subject.  On a scale of
0 to 10 for usefullness your subject scores about -2.

> I'm having some trouble connecting to a third site via both SSleay and
> UserAgent.  I think it might have something to do with the
> certificates, but I can't work out exactly what.  I keep on getting a
> 500 error, when I am expecting a Location moved response.
> 
> Would someone mind having a quick look over my code and seeing if
> there is something blatently obviously wrong that I'm missing.

Indentation and warnings.  Nither of these would directly account for
the error but they are blatently missing.  The lack of indentation
makes it unreasonably difficult for anyone trying to help you to
understand the logic.

You say you are UserAgent (presumably LWP::UserAgent) but you also
appear to be using Net::SSLeay::get_https.  This seems odd to me.

-- 
     \\   ( )
  .  _\\__[oo
 .__/  \\ /\@
 .  l___\\
  # ll  l\\
 ###LL  LL\\


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

Date: Thu, 17 Jun 2004 13:17:41 +0000 (UTC)
From: kj <socyl@987jk.com>
Subject: Structure of complex distributions
Message-Id: <cas5ll$1il$1@reader2.panix.com>






I am working on a pretty complex distribution, and I could use some
advice on how to structure its directories.
 
This distribution contains several modules, not all under the same
directory (i.e.  A.pm, B.pm, A/X.pm, B/Y.pm, etc.).

Moreover, some of these modules are Perl extensions, so there's a
whole bunch of *.xs, *.c, *.h, and typemaps files associated with
them [1].

In addition, the distribution includes several scripts.

Some of these scripts are part of the distribution proper.

Other scripts are code-generating *.pl.PL scripts.  The resulting
*.pl scripts are part of what is ultimately installed.

The remaining scripts (e.g. Configure.pl, and test scripts) are
run during installation.

The distribution also includes separate *.pod and *.html documentation
files.

Lastly, this distribution includes several LARGE data files (they
account for 95% of the installed distribution's footprint).

What directory structure would you use for such a distribution? Is
there anything like a consensus on what types of files go where?

I look forward to reading your thoughts on this.  Thanks.

kj

[1] I have seen many cases in which, e.g., Foo.xs file is placed
at the top of the distro, while the corresponding Foo.pm (which
defines the package Bar::Baz::Foo) is placed either in $TOP_OF_DISTRO
or in $TOP_OF_DISTRO/lib/Bar/Baz.  I get the impression that there
is something against putting Foo.xs in $TOP_OF_DISTRO/lib/Bar/Baz.
Is this the case, and why?  The cases in which Foo.pm is put in
$TOP_OF_DISTRO, right alongside Foo.xs, and not in
$TOP_OF_DISTRO/lib/Bar/Baz also puzzle me.
-- 
NOTE: In my address everything before the period is backwards.


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

Date: Thu, 17 Jun 2004 13:31:13 GMT
From: Chris <ceo@nospan.on.net>
Subject: Re: Win32::OLE->GetObject doesn't work on WinXP?
Message-Id: <B2hAc.61$j14.60@newssvr32.news.prodigy.com>

Goh, Yong Kwang wrote:
> Hi.
> 
> I copied the code fragment from
> http://www.wellho.net/solutions/1480965085.html to extract text from
> Microsoft Word document.
> 
> ---
> 
> use Win32::OLE;
> use Win32::OLE::Enum;
> 
> print "Opening $ARGV[1]\n";
> $document = Win32::OLE->GetObject("$ARGV[1]");
> 
> if(!defined $document){
> 	die "Document still not defined!";
> }
> 

Provide the full path to the document.  Also, the above fragment of code 
is more commonly and concisely written as:

$document = Win32::OLE->GetObject( $ARGV[1] ) || die "Document not 
defined!";

The quotes are unnecessary around the $ARGV[1].

-ceo


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

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


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