[18931] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 1126 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Jun 13 11:05:58 2001

Date: Wed, 13 Jun 2001 08:05:19 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <992444719-v10-i1126@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 13 Jun 2001     Volume: 10 Number: 1126

Today's topics:
    Re: 2 questions about flock <m.grimshaw@salford.ac.uk>
        [OT] Re: Help with split?vvp <hillr@ugs.com>
    Re: a question to programmers. <comdog@panix.com>
    Re: Ack!  Newbie still suffering from C-brain! <ren@tivoli.com>
    Re: Ack!  Newbie still suffering from C-brain! (Anno Siegel)
        ActivePerl secure, robust? <yf32@cornell.edu>
    Re: CPAN hacked? <newspost@coppit.org>
    Re: Help with split?vvp <godzilla@stomp.stomp.tokyo>
    Re: log file parsing <ren@tivoli.com>
    Re: New word gls@byu.edu
    Re: Problem with nph-script <Andreas.Riese@Informatik.Uni-Oldenburg.DE>
    Re: Removing ^M characters <tp601553@cia.gov>
    Re: Sending Attachments Via Sendmail <nospam@hotmail.com>
        Serial Comms Win32 <GaryHall@Cadence.Com>
    Re: sorting a list of files from a directory <ren@tivoli.com>
        splitting a string into numerical format mbower@ibuk.bankgesellschaft.de
    Re: What is ${'string'} ? <pne-news-20010613@newton.digitalspace.net>
    Re: What is ${'string'} ? (Anno Siegel)
    Re: What is ${'string'} ? <ren@tivoli.com>
        Which C compiler to use for modules? <godzilla@stomp.stomp.tokyo>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Wed, 13 Jun 2001 14:06:55 +0100
From: Mark Grimshaw <m.grimshaw@salford.ac.uk>
Subject: Re: 2 questions about flock
Message-Id: <3B27656F.426EA8D3@salford.ac.uk>

Mark Grimshaw wrote:
> 
> Hi all,
> 
> Looked through books, perldoc -f flock etc. but none the wiser.
> 
> 1/
> flock operates on a filehandle.  How/can I implement it on a db_file
> that has been opened with tie?
> 
> 2/
> Can someone explain, in plain English please, the difference between
> LOCK_EX and LOCK_SH?

To get this thread sort of back on track (as OP), I've been looking at
Berkeley Databases and DB_File (which is what I'm using) as described on
p392-3 of the camel book 2nd. edition.  I notice it says be careful to
use the sync() method so that data is actually written to the database
_before_ it is unlocked and is not held in cache.

I have the following snippet of code:

###############
sub write_db    # write data to db
{
my $string = $_[0];
my $db = new my_DB;
my ($len, $DB);
        
# lock the lock file
        open(LOCK, ">$lock") or print "unable to open lock file: $!",
$out->tail;
        flock(LOCK, LOCK_EX);
        if(!($DB = $db->open_db($db_file, O_RDWR|O_CREAT)))
        {
                print "Error. Failed to create/write database.";
                $out->tail;
        }
# get length of DB which will provide db key for this record
        $len = keys %$DB;
        $DB->{$len} = $string;
        $db->sync();    # flush output to DB
print "here<P>";
        untie %$DB;
        undef %$DB;
        close(LOCK);    # unlocked as well.
}

################

open_db() is a db tie method I've defined in an external package:

sub open_db     # tie %DB to db with supplied mode
{
shift;
my @input = @_;
my %DB;
        tie(%DB, 'DB_File', $input[0], $input[1]) or return 0;
        return \%DB;
}

(as is tail()).  That package has use DB_File; in it while the script
above does not.  Without the $db->sync(); statement above, the script
works fine and prints my test statement "here" as well as outputting all
the HTML print statements I have in other subroutines of the script -
data is written to the database.

With the $db->sync(); statement, "here" is not printed nor other print
statements and data _is_ written to the database.  I've tried adding a
use DB_File; statment at the top of the script with the same results. 
I've tried the following:
        $db->sync() or die print "help: $!<P>"; # flush output to DB
but no indication of an error occurs.

Any idea what's up?


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

Date: Wed, 13 Jun 2001 07:39:51 -0700
From: Ron Hill <hillr@ugs.com>
Subject: [OT] Re: Help with split?vvp
Message-Id: <3B277B37.59967C95@ugs.com>



"Godzilla!" wrote:

> [snipped]
> I am using Program File Editor version 1.01.000 written
> by Alan Phillips of Lancaster University over in England.
> It is a decent editor which performs those functions which
> I want in an editor.
>
> However, this unknown special treatment of terminating
> newlines is rather exasperating although I now know what
> to do to avoid this behavior. Nonetheless I cannot create
> a file without a terminating newline for testing due to
> this automatic addition of a newline when one isn't present,
> upon saving a file. I will have to do this by writing a file
> with Perl, to exclude a terminating newline.
> [more snippage]

> Godzilla!

Hello,

I also use PFE, Have you tried the save as option and check the unix
format box?
I hope this helps.

Ron



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

Date: Wed, 13 Jun 2001 10:27:29 -0400
From: brian d foy <comdog@panix.com>
Subject: Re: a question to programmers.
Message-Id: <comdog-801957.10272913062001@news.panix.com>

In article <9g5mme04h8@drn.newsguy.com>, thinkit <thinkit8@lycos.com> 
wrote:

> if a language only offered hexadecimal and binary input literals, would you be
> more or less likely to utilize it?  in a similar line, how much hexadecimal do
> you use in the languages you use now?  do you count to 16, or to 0x10?


i don't think that would make me stop using Smalltalk which allows
you to use just about any base that you like. :)

but then, you can use hexadecimal and binary literals in Perl too.
why use something with less features?

-- 
brian d foy <comdog@panix.com>
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html



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

Date: 12 Jun 2001 22:06:33 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: Ack!  Newbie still suffering from C-brain!
Message-Id: <m3wv6h13k6.fsf@dhcp9-173.support.tivoli.com>

[Jeopardectomy]

On 12 Jun 2001, steve.busiello@gs.com wrote:

> dha@panix.com (David H. Adler) wrote in message
> news:<slrn9i9s37.ep2.dha@panix2.panix.com>...
>
>> On a more practical note, you might want to read Effective Perl
>> Programming by Joseph Hall (w/Randal Schwartz, but who cares about
>> *him* ;-).  Very good book for learning to write idiomatic Perl.
>> 
> Definately the BEST book for accomplished perl programmers:
> 
> you start thinking perl wise when you start writing
> $line = "Steven is a Java programmer\n";
> substr($line,12,4) = "Perl";
> print "$line";

Ouch!  I hope not.  While using substr as a lvalue is definitely
Perl-ish, a regex is more likely for this case.  But the real "ouch"
is that frivolous stringification of $line on the print statement.

-- 
Ren Maddox
ren@tivoli.com


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

Date: 13 Jun 2001 14:42:47 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Ack!  Newbie still suffering from C-brain!
Message-Id: <9g7u57$en1$1@mamenchi.zrz.TU-Berlin.DE>

According to Ren Maddox  <ren@tivoli.com>:
> [Jeopardectomy]
> 
> On 12 Jun 2001, steve.busiello@gs.com wrote:
> 
> > dha@panix.com (David H. Adler) wrote in message
> > news:<slrn9i9s37.ep2.dha@panix2.panix.com>...
> >
> >> On a more practical note, you might want to read Effective Perl
> >> Programming by Joseph Hall (w/Randal Schwartz, but who cares about
> >> *him* ;-).  Very good book for learning to write idiomatic Perl.
> >> 
> > Definately the BEST book for accomplished perl programmers:
> > 
> > you start thinking perl wise when you start writing
> > $line = "Steven is a Java programmer\n";
> > substr($line,12,4) = "Perl";
> > print "$line";
> 
> Ouch!  I hope not.  While using substr as a lvalue is definitely
> Perl-ish, a regex is more likely for this case.  But the real "ouch"
> is that frivolous stringification of $line on the print statement.

On a different note, while jocularly put, the example expresses
a Perl partisanship that is thankfully absent in most of the
discourse of this group.  When it does crop up (more on IRC than
on Usenet) it never fails to make me uncomfortable.

Anno


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

Date: Wed, 13 Jun 2001 09:42:40 -0400
From: "Young C. Fan" <yf32@cornell.edu>
Subject: ActivePerl secure, robust?
Message-Id: <9g7qkl$cqe$1@news01.cit.cornell.edu>

Hi,

Is ActivePerl secure and robust for production use? We're hosting numerous
organization's web sites and I'm looking for information on what I need to
do to set up ActivePerl in a way that prevents security problems.

Can anyone point me to any info about that?

Thanks a lot!

Young




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

Date: Wed, 13 Jun 2001 10:40:54 -0400
From: David Coppit <newspost@coppit.org>
Subject: Re: CPAN hacked?
Message-Id: <Pine.SUN.4.33.0106131039390.2748-100000@mamba.cs.Virginia.EDU>

On 13 Jun 2001, ewww wrote:

> Elaine Ashton <elaine@chaos.wustl.edu> wrote:
> >"Godzilla!" <godzilla@stomp.stomp.tokyo> wrote:
> >> I will strongly urge you to pursue criminal prosecution.
> >> This is easy to do and almost always successful. A crime
> >> has been committed. Don't turn a blind eye. I never do.
> >
> >Why? It would simply waste more time and, since the site
> >neither generates nor is supported by any commercial enterprise,
> >money we don't have.
> >
> >e.
> >
> Godzilla said criminal not civil.  Just hand over any logs, etc to
> the FBI (or equivalent) and let them do the work.
> Didn't cost you a cent.

It would be a waste of time. The FBI won't get involved unless the
damage is more than $50,000. See

http://grc.com/dos/grcdos.htm

For a fascinating account of tracking a DoS attack.

David



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

Date: Wed, 13 Jun 2001 07:19:54 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Re: Help with split?vvp
Message-Id: <3B27768A.5839C2F0@stomp.stomp.tokyo>

Rolf Krahl wrote:
 
> Godzilla! wrote:

(snippage)

> > Truth is you are right. My mistake is in not
> > noticing what my program editor does. I was
> > actually terminating with \n\n although my
> > editor only displays one terminating \n after
> > a search and replace.
 
> So they are still advantages in using cat as text editor.  :)

 
I am using Program File Editor version 1.01.000 written
by Alan Phillips of Lancaster University over in England.
It is a decent editor which performs those functions which
I want in an editor.

However, this unknown special treatment of terminating
newlines is rather exasperating although I now know what
to do to avoid this behavior. Nonetheless I cannot create
a file without a terminating newline for testing due to
this automatic addition of a newline when one isn't present,
upon saving a file. I will have to do this by writing a file
with Perl, to exclude a terminating newline.

After learning of this problem, I carefully went through
all preference options and found nothing related to setting
newline treatment; it is a built-in function which cannot
be changed by a user.

During testing of those four code samples, two worked fine
and two failed for reasons unrelated to a terminating \n.
While testing, I considered most files are terminated with
a newline and decided I should add this for realistic test
conditions. Those two correct codes then failed. As a matter
of double checking my controls, I reopened my saved file and
tested for a terminating newline. My editor showed one
terminated newline as expected but in reality had saved two
terminating newlines. Unknown to me, my editor automatically
truncates terminating double newlines, \n\n , down to one when
a file is opened but saves those double newlines in reality.

All along, I was working under an assumption my editor
saves files precisely as created, which is what I expect
but does not happen. This is a bit annoying; I dislike
programs of this type which do "things" without your 
knowledge or permission to do so.

Most exasperating is I thought to myself, after a lot
of testing, "I have never noticed this behavior before
with Perl." Inherently I dismissed this glitch for that
very reason; I never noticed this before and assumed
this to be normal Perl behavior.

Naturally I am now wondering if there have been other
times this automatic adding and truncating treatment
of newlines has caused problems for me leading to my
coding "around" this problem thinking it is normal
Perl behavior and never realizing it is related to
the way my editor saves and displays files. This code
of mine I posted, certainly shows my coding around
what I thought to be normal Perl behavior I had simply
never noticed before!

I suspect many editors have this feature, unknown
to the user. Caveat Emptor, yes?


Godzilla!


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

Date: 12 Jun 2001 21:56:18 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: log file parsing
Message-Id: <m31yop2ilp.fsf@dhcp9-173.support.tivoli.com>

On Wed, 13 Jun 2001, cberry@cinenet.net wrote:

> Todd Smith (todd@designsouth.net) wrote:
> : $logfile = "file.log";
> : open I, $logfile;
> 
> Always check the result of open.

Yes, always.

And yes, it's important enough to justify this post.

-- 
Ren Maddox
ren@tivoli.com


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

Date: 13 Jun 2001 08:51:19 -0600
From: gls@byu.edu
Subject: Re: New word
Message-Id: <u8ziwa0wo.fsf@SNOW.i-did-not-set--mail-host-address--so-shoot-me>

Gary <gamtci@mpinet.net> writes:

> Since version 6 is in the brew, to whom might I suggest a
> keyword/function?
> 
> Since having used require and use, I find that a simpler merge 
> would be handy, particularly if all one wanted to do was have a 
> Perl script brought it to the currently being read/compiled one 
> as though the merged-in file were part of the original file and 
> at the location merge was encountered.

Are you aware that 

do 'perl-subs.pl';

does something along those lines?

If that does not already do what you want, what would your 
merge function do differently?

hope this helps,

-- 
Greg Snow, PhD                Office: 223A TMCB
Department of Statistics      Phone:  (801) 378-7049
Brigham Young University      Dept.:  (801) 378-4505
Provo, UT  84602              email:  gls@byu.edu


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

Date: 13 Jun 2001 15:36:45 +0200
From: "Andreas Riese" <Andreas.Riese@Informatik.Uni-Oldenburg.DE>
Subject: Re: Problem with nph-script
Message-Id: <9g7q9e$gca@news.Informatik.Uni-Oldenburg.DE>

>>>>> On Wed, 13 Jun 2001 12:34:39 +0100, James Taylor <SEE_MY_SIG@nospam.demon.co.uk> said:

JT> In article <9g7ct3$5ni@news.Informatik.Uni-Oldenburg.DE>, Andreas Riese
JT> <URL:mailto:Andreas.Riese@Informatik.Uni-Oldenburg.DE> wrote:
>> 
>> I've written an nph-script which should print the output line by
>> line in the browser, while the script ist still running. This works
>> fine in Netscape browsers but doesn't work in Internet Explorer
>> on Mac OS (but it works on Windows 98).

JT> Just a guess but, perhaps the IE on the Mac was configured to read
JT> through a caching proxy that doesn't deal with nph scripts correctly.
JT> Turn the proxy setting off to see if I'm right.

I already had the proxy turned off. This has occurred on different
computers with different versions of IE.

Thanks anyway,
Andreas
-- 
+    mailto:ar@andreas-riese.de  |  http://www.andreas-riese.de     +
+ "Real Life (TM) is a multi user dungeon you enter by logging off" +


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

Date: Wed, 13 Jun 2001 13:16:23 GMT
From: "Tweetie Pooh" <tp601553@cia.gov>
Subject: Re: Removing ^M characters
Message-Id: <Xns90BF9133E3D30TweetiePooh@62.253.162.105>

Thanh Q Lam <thanh.q.lam@alcatel.com> honoured comp.lang.perl.tk on Tue 12
Jun 2001 08:46:05p with news:3B26717D.BE551C2E@alcatel.com: 

> Does anyone know how to remove the "^M" characters at the end of each
> line which without removing uppercase M that may have in the same line in
> perl? 
> 
> Examples:
> This is a book^M
> That is a Mango^M
> 
> If I use tr -d in unix which will remove all "M"
> 
> Result:
> This is a book
> That is a ango
> 
> 
> Your help will be very appreciated.
> 
> -Thanh

in vi I use
:%s/<CTRL>v<CTRL>m//

<CTRL> = press and hold control key (sorry if that is obvious).

I think this usually happens if you ftp from win to UNIX in binary mode.
Use ASCII mode and many ftp systems will convert win EOL to UNIX EOL and no 
^M will appear.



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

Date: Wed, 13 Jun 2001 08:57:59 -0500
From: Mr. SunRay <nospam@hotmail.com>
Subject: Re: Sending Attachments Via Sendmail
Message-Id: <HjKV6.190$wj7.65235@news.uswest.net>

I wrote:

> Antoine Hall wrote in comp.lang.perl.misc:
> } Is there a way to attach files to an email when using Sendmail?  I want to
> } be able to send an email to someone and attach log files but have the
> } process automatic using sendmail.  Can it be done?
> 
> Of course, sendmail can handle emails with attachments. An attachment is
> essentially a way to format the body of the mail. It's intended to be
> decoded and encoded by mail user agents. The job of sendmail is only to
> transport the mails over a network, not to handle its contents.
> 
> To answer your question: use the MIME::Lite module.
> 
Or the Mail::Sender module

Regards,

Mr. Sunray



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

Date: Wed, 13 Jun 2001 14:36:44 +0100
From: Gary Hall <GaryHall@Cadence.Com>
Subject: Serial Comms Win32
Message-Id: <3B276C6C.D13F7E@Cadence.Com>

Can anyone point me to some examples of how to communicate via a PC
serial port using perl.



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

Date: 12 Jun 2001 22:14:15 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: sorting a list of files from a directory
Message-Id: <m3snh5137c.fsf@dhcp9-173.support.tivoli.com>

On Tue, 12 Jun 2001, krahnj@acm.org wrote:

> Zsa Zsa wrote:
>> 
>> I am looking for the best way to sort files within a directory for
>> the purpose of listing.  My ultimate goal is to sort the files in
>> order of last modified (most recent at top of list).  I developed
>> this:
>> 
>> opendir DIRH, "/path/tofolder" or die "couldn't open: $!";
>> foreach (sort { -M $a <=> -M $b } readdir DIRH) {
> 
> This sorts the oldest files first, change to

What makes you think that?  -M gives the age and the above sort (once
fixed for the missing path problem) sorts smallest age first, which
equates to most recent first as desired.

> foreach (sort { -M $b <=> -M $a } readdir DIRH) {

Naturally, this does just the opposite and (also after fixing the
missing path problem) results in the largest age first.

-- 
Ren Maddox
ren@tivoli.com


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

Date: Wed, 13 Jun 2001 14:58:08 GMT
From: mbower@ibuk.bankgesellschaft.de
Subject: splitting a string into numerical format
Message-Id: <3b277e94.111665906@news>

Can anyone help me with a regular expression to do the following ?

$amount = "1234567";    # This can be variable length and can end with
decimal places
$amount = "12345.23";


$outstring ="1,234,567"   or $outstring= "12,345.23"





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

Date: Wed, 13 Jun 2001 15:17:50 +0200
From: Philip Newton <pne-news-20010613@newton.digitalspace.net>
Subject: Re: What is ${'string'} ?
Message-Id: <unpeitg6ddjh5r8n6o4l0705jfumj7pi5v@4ax.com>

On Wed, 13 Jun 2001 12:47:12 GMT, Gordon.Haverland@gov.ab.ca wrote:

> I'll settle for descriptions as to why a person would use either, or
> both.

${variable} is commonly used when the variable is being interpolated
into a string and is followed by other letters or numbers -- for example
"There are two ${item}s here." so show that you're talking about $item
followed by the letter 's' rather than the variable "$items".
${'variable'} is a soft reference and is used far less often.

> This program I am trying to install has a number of hashes
> scattered throughout it.  All hashes except for one are named,

Not sure what you mean with "All hashes are named".

> like $hash{key}, $item{'key'} or $item{"key"}.

That's different; those are all the same AIUI, since hash keys are
strings. So any bareword in hash braces is automatically stringified
(with the result that if you want e.g. $hash{time} or $hash{ shift } to
use the Perl built-ins of the same name, you'll have to do something
like $hash{+time} or $hash{ shift() }). If what's inside doesn't look
like a "word" (for example, contains punctuation or spaces), you'll need
quotes, e.g. $hash{'two words'} or $swearword{'%&!@#'}.

Cheers,
Philip
-- 
Philip Newton <nospam.newton@gmx.li>
Yes, that really is my address; no need to remove anything to reply.
If you're not part of the solution, you're part of the precipitate.


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

Date: 13 Jun 2001 13:20:56 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: What is ${'string'} ?
Message-Id: <9g7pbo$6mb$1@mamenchi.zrz.TU-Berlin.DE>

According to  <Gordon.Haverland@gov.ab.ca>:
> On Wed, 13 Jun 2001 00:07:03 GMT, "Todd Smith" <todd@designsouth.net>
> wrote:
> >"Wyzelli" <wyzelli@yahoo.com> wrote in message
> >news:KdxV6.4$_p6.3250@vic.nntp.telstra.net...
> >> "Todd Smith" <todd@designsouth.net> wrote in message
> >> news:mhuV6.140808$I5.37858595@news1.rdc1.tn.home.com...
> 
> >> > print "I have two ${item}s";
> >>
> >> But that is not the same as
> >>
> >> print "I have two ${'item'}s";
> >>
> >> Which is what the OP was talking about.
> 
> I'll settle for descriptions as to why a person would use either, or
> both.  This program I am trying to install has a number of hashes
> scattered throughout it.  All hashes except for one are named, like
> $hash{key}, $item{'key'} or $item{"key"}.  To me, this looks like the
> original programmer just made a mistake.  Is there some different
> about ${key} or ${'key'} which points to its use in special
> circumstances?

Well, there are circumstances where it would make a difference.
You could access a package variable in the presence of a like-
named lexical via ${'key'}, but a competent programmer would
use $::key or similar for that.

Have you considered the possibility that "${'key'}" was originally
a hash element where the name of the hash fell victim to an edit
accident?  Like, it was "$some_hash{'key'}" in a former life?

Anno


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

Date: 12 Jun 2001 21:54:46 -0500
From: Ren Maddox <ren@tivoli.com>
Subject: Re: What is ${'string'} ?
Message-Id: <m366e12io9.fsf@dhcp9-173.support.tivoli.com>

On Wed, 13 Jun 2001, todd@designsouth.net wrote:

> [root@raq300 Merchant3]# perl
> $a = 4;
> print <<STOP;
> 123${a}56
> 123${'a'}56
> 123${"a"}56
> STOP
> 123456
> 123456
> 123456
> [root@raq300 Merchant3]#
> 
> how's it different?

$ perl
my $a = 4;
print <<STOP;
123${a}56
123${'a'}56
123${"a"}56
STOP
__END__
123456
12356
12356

That's how, for one.

$ perl -wMstrict
$a = 4;
print <<STOP;
123${a}56
123${'a'}56
123${"a"}56
STOP
__END__
Can't use string ("a") as a SCALAR ref while "strict refs" in use at - line 2.

And that's another.  Though they're really two sides of the same
coin.  (BTW, $a gets by strictures because of its special allowance
for sort.)

${a} is just another way to write $a, while ${'a'} bypasses that
syntax and is an explicit request to look "a" up in the current
package.

FWIW, you *can* bypass the "strict refs" by being more circumspect --
not that I am recommending this by any stretch:

$ perl -wMstrict
$a = 4;
my $var = "a";
print <<STOP;
123${a}56
123${$::{"a"}}56
123${$::{$var}}56
STOP
__END__
123456
123456
123456

The point being that if you demonstrate that you *really* mean to
access the symbol table, then you can.  You just can't do it
haphazardly.

-- 
Ren Maddox
ren@tivoli.com


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

Date: Wed, 13 Jun 2001 07:58:45 -0700
From: "Godzilla!" <godzilla@stomp.stomp.tokyo>
Subject: Which C compiler to use for modules?
Message-Id: <3B277FA5.F4861A41@stomp.stomp.tokyo>


I am currently looking for a C compiler which is
well known to work for compiling Perl modules for
use under Win 32 systems.

First a gripe, a well deserved gripe. While playing
around with a couple of modules, trying to circumvent
a need for a C complier, I discovered some modules
call other modules. How I discovered this is by
truncating a module name to standard DOS eight
characters followed by an extension for successful
loading without need of C compilation. Loading is
successful but fails upon calling another module
from within, which is not DOS eight character. 
I am rather surprised and annoyed modules are being
written  which are not "stand alone" and require 
other modules to be installed, without this being
noted in a module's documentation. This is very
stupid programming and even more stupid documentation.

Inherently, I will add this to my long list of complaints
about modules; those which call other modules run even
slower and are greater memory hogs than I previously knew.

Lousy, such lousy documentation by module writers.

According to most documentation for compiling modules,
use of Microsoft's Visual C program is needed. Annoyingly
this information is only casually mentioned or is well
hidden within a DOS Dynamic Package Manager bat file with
little information other than,

"...vcvars32.bat to set required environment variables."

Microsoft's most basic C compiler is one-hundred-nine dollars
which is not too bad of a price. However, their versions,
with increasing features, range up to eight-hundred dollars.
This is rather unaffordable for a toy and certainly unaffordable
for a program which may or may not work for compiling modules.

Thank Goodness for warez to cover a need to test. This is not
to suggest I support pirating software; I am adamantly against
this activity but am equally adamant about software advertisement
including "full" documentation. Few do leading to justification
for warez to discover if a purchase price is validated.

Any suggestions for a C compiler which is factually known to
successfully compile modules? Any little known sites which
store pre-complied modules other than the usual ActiveState
and IndigoPerl repositories?

My primary purpose is to attain information about C compilers
which are tested and documented to correctly compile modules
before spending my hard earned egg money.

Thanks.

Godzilla!


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

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.  

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


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