[22337] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4558 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Feb 12 18:06:55 2003

Date: Wed, 12 Feb 2003 15:05:12 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Wed, 12 Feb 2003     Volume: 10 Number: 4558

Today's topics:
        $q->a( -href ... ) question (Ran)
    Re: $q->a( -href ... ) question <tassilo.parseval@post.rwth-aachen.de>
    Re: [Regex] Removing lines not containing a substring (Allan Cady)
    Re: Analyzing Columns of Data (brice)
    Re: File-handles as variables <nobull@mail.com>
    Re: File-handles as variables <nobull@mail.com>
    Re: File-handles as variables <goldbb2@earthlink.net>
    Re: grep with line number ? <eric.ehlers@btopenworld.com.nospam>
    Re: grep with line number ? ctcgag@hotmail.com
    Re: grep with line number ? (Anno Siegel)
        HELP! - error message not making sense <cb@sebaw.com>
    Re: HELP! - error message not making sense <cb@sebaw.com>
    Re: HELP! - error message not making sense <tony_curtis32@yahoo.com>
    Re: Indented Text to Nested DataStructure[Tricky or Eas <goldbb2@earthlink.net>
        Is perl -s broken in perl 5.8.0 or fixed? (Max)
    Re: PERL JAYCAR IO Parallel <goldbb2@earthlink.net>
    Re: Perl script to create new user in Linux. <dcutter@gmx.de>
    Re: Perl+Tk+MySQL for Win32 that *works*? (Jim Seymour)
    Re: Perl+Tk+MySQL for Win32 that *works*? <jeff@vpservices.com>
    Re: Perl+Tk+MySQL for Win32 that *works*? (Randy Kobes)
    Re: PersistentPerl never resolves first time through <goldbb2@earthlink.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: 12 Feb 2003 11:45:56 -0800
From: rshoham@yahoo.com (Ran)
Subject: $q->a( -href ... ) question
Message-Id: <a98ee21f.0302121145.13e8506@posting.google.com>

Hello all,

In HTML I can do the following:
<A HREF="urldestination" TARGET="NEW">   </A> to open the 
URL in a new window.


I wish to do this on my Perl CGI form.  So far I have:

print $q->a( { -href => $urldestination }, $urldestination );



But I can't for the life of me figure out how to implement the
target = "new" in this format.

Any working ideas welcome.


Best regards,

Ran (please reply to rshoham@yahoo.com if possible)


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

Date: 12 Feb 2003 20:10:42 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@post.rwth-aachen.de>
Subject: Re: $q->a( -href ... ) question
Message-Id: <b2e9o2$8sf$1@nets3.rz.RWTH-Aachen.DE>

Also sprach Ran:

> In HTML I can do the following:
><A HREF="urldestination" TARGET="NEW">   </A> to open the 
> URL in a new window.
> 
> 
> I wish to do this on my Perl CGI form.  So far I have:
> 
> print $q->a( { -href => $urldestination }, $urldestination );
> 
> 
> 
> But I can't for the life of me figure out how to implement the
> target = "new" in this format.

Well, what about the most obvious solution:

    print $q->a( { -href    => $urldestination,
                   -target  => "NEW" }, $urldestiation );
                
> Ran (please reply to rshoham@yahoo.com if possible)

Nope, sorry. Asking publicly but preferring a private answer is slightly
selfish. If you really want an email, better ask for a CCed copy.

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


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

Date: 12 Feb 2003 14:01:15 -0800
From: allancady@yahoo.com (Allan Cady)
Subject: Re: [Regex] Removing lines not containing a substring
Message-Id: <d563b154.0302121401.2252e916@posting.google.com>

Abigail <abigail@abigail.nl> wrote...
>     s/^(?!\s*<td).*\n//;

Abigail gets the prize!  That's the answer I was looking for.  Works
perfectly.  (Well, I did have to add the /mgi, but otherwise...).

Thanks,

-Allan

> 
> 
> Abigail


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

Date: 12 Feb 2003 12:51:43 -0800
From: bricemason@hotmail.com (brice)
Subject: Re: Analyzing Columns of Data
Message-Id: <50404b7a.0302121251.1979c839@posting.google.com>

Jeff 'japhy' Pinyan <pinyaj@rpi.edu> wrote in message news:<Pine.SGI.3.96.1030212095444.51853A-100000@vcmr-64.server.rpi.edu>...
> If you don't understand references, or the syntax I've used, you need to
> read some Perl documentation:
> 
> perldoc perlreftut
> perldoc perlref
> 
> for a start.

Perfect. Thanks Jeff. This will work great.

-brice


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

Date: 12 Feb 2003 19:11:58 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: File-handles as variables
Message-Id: <u9vfzpxqip.fsf@wcl-l.bham.ac.uk>

roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson) writes:

> In article <HA7KM5.BDF@campus-news-reading.utoronto.ca>,
> Okey Laboratory <itatsumakiNO@SPAMhotmail.com> wrote:
> :This is a stupid question, because I remember reading the answer before and
> :just can't locate it in the perldocs.  I am parsing a tab-delimited file,
> :and depending on the value in the first element I'll either want to write to
> :one file or the other.  Because the rest of my parsing is identical except
> :for file-handle to which I print, I'd love to be able to dynamically set
> :file-handles.
> 
> If you use a scalar variable in a location that a FILEHANDLE is
> expected, then the string value of the variable will be used as the
> FILEHANDLE name.

Please do not encourage the use of symbolic references.

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


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

Date: 12 Feb 2003 19:21:37 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: File-handles as variables
Message-Id: <u9r8adxq2m.fsf@wcl-l.bham.ac.uk>

"Okey Laboratory" <itatsumakiNO@SPAMhotmail.com> writes:

> This is a stupid question, because I remember reading the answer before and
> just can't locate it in the perldocs.  I am parsing a tab-delimited file,
> and depending on the value in the first element I'll either want to write to
> one file or the other.  Because the rest of my parsing is identical except
> for file-handle to which I print, I'd love to be able to dynamically set
> file-handles.

You should use GLOBrefs.  (Not GLOBs, not symrefs, not IOrefs - all of
which also work but have problems).

> open(RGD, '>rgd.csv');
> open(MGI, '>mgi.csv');

>      if ($row[0] =~ /^rgd$/g) {# process with file-handle RGD}
>     elsif ($row[0] =~ /^mgi$/g) {# process identically with file-handle MGI}

     my $handle_to_use;
     if ($row[0] =~ /^rgd$/g) { $handle_to_use = \*RGD }
     elsif ($row[0] =~ /^mgi$/g) { $handle_to_use \*MGI }

     if ( $handle_to_use ) {
        #process with file-handle $handle_to_use
     }

As of Perl 5.6 the you can hide the uglyness of old bare filehandles
almost completely and pretend like they are regular objects.

> open(RGD, '>rgd.csv');
> open(MGI, '>mgi.csv');

Becomes:

open(my $rgd, '>', 'rgd.csv') or die $!;
open(my $mgi, '>', 'mgi.csv') or die $!;

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


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

Date: Wed, 12 Feb 2003 15:14:27 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: File-handles as variables
Message-Id: <3E4AAB23.99D0316@earthlink.net>

Okey Laboratory wrote:
[snip]
> open(RGD, '>rgd.csv');
> open(MGI, '>mgi.csv');
> 
> while (<IN>) {
>      my @row = split("\t");
> 
>      if ($row[0] =~ /^rgd$/g) {# process with file-handle RGD}
>     elsif ($row[0] =~ /^mgi$/g) {# process identically with file-handle MGI}
> 
>     }

   #!/usr/local/bin/perl -w
   use strict;
   use warnings;
   my %handles;
   while( <> ) {
      my @row = split /\t/;
      unless( my $fh = $handles{ $row[0] } ) {
         open $fh, ">", "$row[0].csv"
            or die "Couldn't open $row[0].csv for writing: $!";
         $handles{ $row[0] } = $fh;
      }
      print $fh $_;
   }
   __END__
[untested]

This assumes that all lines of the file contain in their first column
a filename which you don't mind potentially overwriting.

-- 
"So, who beat the clueless idiot today?"
"Well, we flipped for it, but when Kuno
 landed, he wasn't in any shape to fight."
"Next time, try flipping a *coin.*"


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

Date: Wed, 12 Feb 2003 19:26:45 +0000 (UTC)
From: "eric" <eric.ehlers@btopenworld.com.nospam>
Subject: Re: grep with line number ?
Message-Id: <b2e75l$p2k$1@helle.btinternet.com>

> > What I have is, I have read an entire text file into an array:
> > open(FILE,"$FILE");
> > @LINES = <FILE>;
> > close(FILE);
> > and want to find the line number containg the expression "###CONTENT###"
> > so I can split my @LINES into two parts, one from the beginning to
> > the line number containing the expression and one for the remaining.
>
>     my ( $i) = grep /###CONTENT###/, @LINES or die "no match";

the ()s around $i put grep into list context - so grep returns a list of the
lines which matched, presumably setting $i equal to "###CONTENT###".
removing the ()s would leave grep in scalar context - so $i would get set
equal to the number of matches - presumably 1.
in neither case does $i capture the line number on which the string
"###CONTENT###" appears, which is what i think you were hoping to do?

>     my @first = @LINES[ 0 .. $i];
>     my @last = @LINES[ $i + 1 .. $#LINES];
>
> Anno

-eric




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

Date: 12 Feb 2003 20:04:14 GMT
From: ctcgag@hotmail.com
Subject: Re: grep with line number ?
Message-Id: <20030212150414.146$8R@newsreader.com>

anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:
> >
> > But you are talking to an illiterate :)
> > What I have is, I have read an entire text file into an array:
> > open(FILE,"$FILE");
> > @LINES = <FILE>;
> > close(FILE);
> > @LINES = <FILE>
>
> This will destroy @LINES (and give you a warning).  I'll assume it
> isn't there.
>
> > and want to find the line number containg the expression
> > "###CONTENT###" so I can split my @LINES into two parts, one from the
> > beginning to the line number containing the expression and one for the
> > remaining.
>
>     my ( $i) = grep /###CONTENT###/, @LINES or die "no match";
>     my @first = @LINES[ 0 .. $i];
>     my @last = @LINES[ $i + 1 .. $#LINES];

ITYM:
my ($i) = grep $LINES[$_] =~ /###CONTENT###/, 0..$#LINES or die "no match";


Xho

-- 
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service              New Rate! $9.95/Month 50GB


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

Date: 12 Feb 2003 20:07:01 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: grep with line number ?
Message-Id: <b2e9h5$nju$1@mamenchi.zrz.TU-Berlin.DE>

eric <eric.ehlers@btopenworld.com.nospam> wrote in comp.lang.perl.misc:
> > > What I have is, I have read an entire text file into an array:
> > > open(FILE,"$FILE");
> > > @LINES = <FILE>;
> > > close(FILE);
> > > and want to find the line number containg the expression "###CONTENT###"
> > > so I can split my @LINES into two parts, one from the beginning to
> > > the line number containing the expression and one for the remaining.
> >
> >     my ( $i) = grep /###CONTENT###/, @LINES or die "no match";
> 
> the ()s around $i put grep into list context - so grep returns a list of the
> lines which matched, presumably setting $i equal to "###CONTENT###".
> removing the ()s would leave grep in scalar context - so $i would get set
> equal to the number of matches - presumably 1.
> in neither case does $i capture the line number on which the string
> "###CONTENT###" appears, which is what i think you were hoping to do?

You're absolutely right.  It was meant to be

    my ( $i) = grep $LINES[ $_] =~ /###CONTENT###/, 0 .. $#LINES;

> >     my @first = @LINES[ 0 .. $i];
> >     my @last = @LINES[ $i + 1 .. $#LINES];

Anno


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

Date: Wed, 12 Feb 2003 21:32:55 GMT
From: "Dartnagnan" <cb@sebaw.com>
Subject: HELP! - error message not making sense
Message-Id: <b4z2a.4232579$6N5.557271@post-03.news.easynews.com>

Redhat 8.0 and Win2K

The error message is:
    Global symbol "$Ftp" requires explicit package name at ftp.plx line 8.

The script is:

    use Net::FTP;

    $ftp = Net::FTP->new("some.host.name", Debug => 0);
    $ftp->login("anonymous",'-anonymous@');
    $ftp->cwd("/pub");
    $ftp->get("that.file");
    $ftp->quit;

Doesn't get much cleaner than that does it?  But it's not working.

I've also tried it without the debug option.  The same thing.  Any thoughts
would be greatly appreciated.

CB




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

Date: Wed, 12 Feb 2003 21:42:41 GMT
From: "Dartnagnan" <cb@sebaw.com>
Subject: Re: HELP! - error message not making sense
Message-Id: <ldz2a.39283$zx5.5924@news.easynews.com>

Ok, I discovered part of the problem - I forgot the my in front of the first
one.
"Dartnagnan" <cb@sebaw.com> wrote in message
news:b4z2a.4232579$6N5.557271@post-03.news.easynews.com...
> Redhat 8.0 and Win2K
>
> The error message is:
>     Global symbol "$Ftp" requires explicit package name at ftp.plx line 8.
>
> The script is:
>
>     use Net::FTP;
>
>     $ftp = Net::FTP->new("some.host.name", Debug => 0);
>     $ftp->login("anonymous",'-anonymous@');
>     $ftp->cwd("/pub");
>     $ftp->get("that.file");
>     $ftp->quit;
>
> Doesn't get much cleaner than that does it?  But it's not working.
>
> I've also tried it without the debug option.  The same thing.  Any
thoughts
> would be greatly appreciated.
>
> CB
>
>




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

Date: Wed, 12 Feb 2003 16:15:52 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: HELP! - error message not making sense
Message-Id: <87znp1kuw7.fsf@limey.hpcc.uh.edu>

>> On Wed, 12 Feb 2003 21:32:55 GMT,
>> "Dartnagnan" <cb@sebaw.com> said:

> Redhat 8.0 and Win2K The error message is: Global symbol
> "$Ftp" requires explicit package name at ftp.plx line 8.

> The script is:

>     use Net::FTP;

>     $ftp = Net::FTP->new("some.host.name", Debug => 0);
> $ftp->login("anonymous",'-anonymous@');
> $ftp->cwd("/pub"); $ftp->get("that.file"); $ftp->quit;

This is lifted verbatim from perldoc Net::FTP.

> Doesn't get much cleaner than that does it?  But it's
> not working.

You didn't check that the ftp session opened successfully.
Any interaction with the "real world" (like opening files)
can fail and must be tested.

CONSTRUCTOR
       new (HOST [,OPTIONS])

       ...
           If the constructor fails undef will be returned and an
           error message will be in $@

hth
t


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

Date: Wed, 12 Feb 2003 14:55:12 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Indented Text to Nested DataStructure[Tricky or Easy?]
Message-Id: <3E4AA6A0.2809E7E8@earthlink.net>

Benjamin Goldberg wrote:
[snip]
>    while( <> ) {
>       my ($ws, $txt) = m/^([ \t]*)(.*)/;
>       next unless length;

This is a typo... the line should read:

       next if $_ eq "\n";

With that in place, it works as you requested.

-- 
"So, who beat the clueless idiot today?"
"Well, we flipped for it, but when Kuno
 landed, he wasn't in any shape to fight."
"Next time, try flipping a *coin.*"


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

Date: 12 Feb 2003 12:51:42 -0800
From: pbarone@harris.com (Max)
Subject: Is perl -s broken in perl 5.8.0 or fixed?
Message-Id: <b6a773.0302121251.7cb7ab0d@posting.google.com>

Solaris 8
When using perl -s, with my 5.8.0 version, the scripts using Getopt do
not recognize command line arguments. See this:

Using 5.8.0
----------------
#-(152): more t1.pl
#!/usr/bin/env perl -s
use Getopt::Std;

getopts('c:');
use vars qw($opt_c);

if ( defined $opt_c ) {
  print "c is $opt_c\n";
} else {
  print "c is not defined\n";
}

#-(153): which perl
/programs/ias_work/perl580/bin/perl

#-(154): ./t1.pl -c hello
c is not defined


Here is same script using 5.6.0:
-----------------------------------
#-(107): which perl
/pub/perl_5.6.0/bin/perl

#-(108): ./t1.pl -c hello
c is hello
#-(109): 

When I take off the "-s" the same script functions as expected in
5.8.0.

When I do not use Getopt, I parse command line with ARGV, it works
fine in both versions.


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

Date: Wed, 12 Feb 2003 15:17:40 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: PERL JAYCAR IO Parallel
Message-Id: <3E4AABE4.3A3D8ED9@earthlink.net>

Andrew Rich wrote:
> 
> Anyone used parallel port and perl ?
> 
> I want to control relays

Go get Device::ParallelPort::JayCar from CPAN.

-- 
"So, who beat the clueless idiot today?"
"Well, we flipped for it, but when Kuno
 landed, he wasn't in any shape to fight."
"Next time, try flipping a *coin.*"


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

Date: Wed, 12 Feb 2003 21:00:49 +0100
From: Daniel Cutter <dcutter@gmx.de>
Subject: Re: Perl script to create new user in Linux.
Message-Id: <b2e95r$at4$1@news.eusc.inter.net>


> Does anyone have a Perl-script (or a receipt) to make new Linux-users?  I
> would really appreciate it if I could have a copy :-) Please send a copy of
> answers to my email-adress.  I'm using SUSE 7.3.

Why don't you just embed the command in your perl?

query or read the data then call the command (adduser?) in backticks.

Sonething supposedly looking similiar to this:

$resultcode = `adduser $name $group $password`;

put it in a subroutine and nobody will notice.

Daniel



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

Date: Wed, 12 Feb 2003 19:38:54 -0000
From: gort@LinxNet.com (Jim Seymour)
Subject: Re: Perl+Tk+MySQL for Win32 that *works*?
Message-Id: <v4l8memocecm7f@corp.supernews.com>

In article <N%j2a.41457$7_.177426@news1.mts.net>,
	"Randy Kobes" <randy@theoryx5.uwinnipeg.ca> writes:
[snip]
> 
> There's a ppm package of DBD-mysql for builds 8xx at
>    http://theoryx5.uwinnipeg.ca/ppms/
> which you can access by setting the repository within the
> ppm shell to
>   http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer58
> After installing this, you have to add the path to your mysql dlls
> (eg, C:\mysql\lib\opt\, where libmySQL.dll lives) to your PATH
> environment variable. Alternatively, copy libmySQL.dll to
> somewhere in your PATH, or else to the directory where the Perl
> mysql.dll is (eg, C:\Perl\site\lib\auto\DBD\mysql\).
[snip]

I deleted the C:\Perl directory completely.  Re-installed 805 from
scratch.  Did as you say above to setting the add'l ppm repository
and installed DBI and DBD-mysql from there.  Note that I found no
"libmySQL.dll" anywhere.  I did find a mysql.lib, along with
mysql.dll, in C:\Perl\site\lib\auto\DBD\mysql.  So I didn't do any
path setting or copying.  Result:

    install_driver(mysql) failed: Can't load
    'C:/Perl/site/lib/auto/DBD/mysql/mysql.dll for module DBD:mysql:
    load_file:One of the library files needed to run this application
    cannot be found at C:/Perl/lib/Dynaloader.pm line 229.

> 
[snip]
> 
> If you have the C compiler, building is usually more bullet-proof
> than installing binaries. Have you not had bad experiences installing
> rpms with dependencies?

Yes.  And when that happens, I resort to building my own.

Can I use gcc, gmake and friends to build the entire Perl distro,
and associated modules, for Win32?  I wouldn't mind doing that.

> 
[snip]
> 
> ActivePerl is the dominant Win32 Perl binary distribution, and it
> "works"
[snip]

Dominant... hmph.  Maybe not the best.  Are there others?  The
"works," in quotes like that, is not encouraging.  I note that
MySQL, and even DBI, don't appear to be on AS' current module
list.  They're no listed at all.  I am not impressed.

Regards,
Jim
-- 
Jim Seymour                    | PGP Public Key available at:
WARNING: The "From:" address   | http://www.uk.pgp.net/pgpnet/pks-commands.html
is a spam trap.  DON'T USE IT! |
Use: jseymour@LinxNet.com      | http://jimsun.LinxNet.com


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

Date: Wed, 12 Feb 2003 12:28:39 -0800
From: Jeff Zucker <jeff@vpservices.com>
Subject: Re: Perl+Tk+MySQL for Win32 that *works*?
Message-Id: <3E4AAE77.8000705@vpservices.com>

Jim Seymour wrote:

> In article <N%j2a.41457$7_.177426@news1.mts.net>,
> 	"Randy Kobes" <randy@theoryx5.uwinnipeg.ca> writes:
> 
>>ActivePerl is the dominant Win32 Perl binary distribution, and it
>>"works"
>>

 > Dominant... hmph.

Maybe you should start posting to alt.whingers instead of here.

 > Maybe not the best.  Are there others?

Yes, several, but your problem is not with the port.

 >  The
 > "works," in quotes like that, is not encouraging.

Nothing you or anyone else has said has indicated any problem with the 
ActiveState port of perl.  Your problem has to do with the packagae 
manager that installs pre-compiled binaries of modules.  Similar 
problems exist with pre-installed binaries on all other systems (e.g. 
rpm on linux).  The problems with the package managers do not equate to 
a problem with the ports of perl.

If you can't manage to use PPM to install the required modules 
(something many many others have been able to accomplish), then you have 
lots of alternatives -- get the version of C++ used to create the 
ActiveState port and compile the modules yourself.  Or use the cygwin 
perl binary and gcc. Or build your own perl and use whatever compiler 
you use to build perl to build the modules.

 > I am not impressed.

And, other than the patient and helpful solutions Randy has proposed, 
what exactly do you expect us to do about that?

-- 
Jeff



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

Date: 12 Feb 2003 21:29:31 GMT
From: randy@theoryx5.uwinnipeg.ca (Randy Kobes)
Subject: Re: Perl+Tk+MySQL for Win32 that *works*?
Message-Id: <slrnb4leov.cej.randy@theoryx5.uwinnipeg.ca>

On Wed, 12 Feb 2003 19:38:54 -0000, Jim Seymour <gort@LinxNet.com> wrote:
>In article <N%j2a.41457$7_.177426@news1.mts.net>,
>	"Randy Kobes" <randy@theoryx5.uwinnipeg.ca> writes:
>[snip]
>> 
>> There's a ppm package of DBD-mysql for builds 8xx at
>>    http://theoryx5.uwinnipeg.ca/ppms/
>> which you can access by setting the repository within the
>> ppm shell to
>>   http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer58
>> After installing this, you have to add the path to your mysql dlls
>> (eg, C:\mysql\lib\opt\, where libmySQL.dll lives) to your PATH
>> environment variable. Alternatively, copy libmySQL.dll to
>> somewhere in your PATH, or else to the directory where the Perl
>> mysql.dll is (eg, C:\Perl\site\lib\auto\DBD\mysql\).
>[snip]
>
>I deleted the C:\Perl directory completely.  Re-installed 805 from
>scratch.  Did as you say above to setting the add'l ppm repository
>and installed DBI and DBD-mysql from there.  Note that I found no
>"libmySQL.dll" anywhere.  I did find a mysql.lib, along with
>mysql.dll, in C:\Perl\site\lib\auto\DBD\mysql.  So I didn't do any
>path setting or copying.  Result:
>
>    install_driver(mysql) failed: Can't load
>    'C:/Perl/site/lib/auto/DBD/mysql/mysql.dll for module DBD:mysql:
>    load_file:One of the library files needed to run this application
>    cannot be found at C:/Perl/lib/Dynaloader.pm line 229.

So it sounds like the problem is is that you haven't installed
mysql itself .... DBD::mysql is just the database driver.
You can get a Win32 mysql binary from http://www.mysql.com/ -
for use with the DBD::mysql package above, you should grab
the production (3.xx) release, rather than the gamma (4.xx)
one.

[..]
>Can I use gcc, gmake and friends to build the entire Perl distro,
>and associated modules, for Win32?  I wouldn't mind doing that.

Yes - look at the cygwin tools, for example. These wouldn't
be compatible with things built with VC++, but if you're
familiar with them, they may be a useful alternative.

>[snip]
>> 
>> ActivePerl is the dominant Win32 Perl binary distribution, and it
>> "works"
>[snip]
>
>Dominant... hmph.  Maybe not the best.  Are there others?  The
>"works," in quotes like that, is not encouraging.  

I meant that in the context of you asking if ActivePerl
works .... Yes, it "works", and very well indeed - as
I also mentioned, look at the activity on the perl-win32
users mailing list at ActiveState's site, and the types
of questions being asked there ....

>                                                 I note that
>MySQL, and even DBI, don't appear to be on AS' current module
>list.  They're no listed at all.  I am not impressed.

They're in the 6xx repository, but not yet in 8xx, which is
relatively new .... There's over 5000 distributions on CPAN,
so ActiveState uses an automated system for ppm packages
whereby they're added to the repository if they can be
built unattended and if all their tests pass, plus those
of the dependencies. DBD-mysql requires an external library,
from the mysql distribution, so this must be built manually.

As Jeff also expressed in another reply, your attitude
seems surprising ... ActiveState is supplying these binaries, 
ppm packages, and, most of all, their expertise, free of 
charge, which in the Win32 world is unusual. Obviously 
there can be glitches, as with anything, but giving blanket 
condemnations because you've encountered these problems aren't 
helpful. What would have happened if people had this attitude 
in the early days of Linux?

-- 
best regards,
randy


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

Date: Wed, 12 Feb 2003 14:50:28 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: PersistentPerl never resolves first time through
Message-Id: <3E4AA584.74097446@earthlink.net>

Todd Boss wrote:
> Benjamin Goldberg wrote:
> > Todd Boss wrote:
> > >
> > > Hello.
> > >
> > > we're using PersistentPerl (formerly known as SpeedyCGI) to help speed
> > > up a large perl-based web app.  Solaris box, Iplanet webserver,
> > > connecting to an Oracle database via DBI::Oracle.
> > [snip]
> >
> > I've no idea why your problem is happening, *but* I've an idea for a
> > sort-of workaround:
> >
> > How much of your site has been adapted to use perperl?  Is it to late
> > for you to consider fastcgi instead?
> 
> Well, because as I Understand, FastCGI doesn't support Iplanet.  Or does it?
> The documentation for FastCGI that i've found online isn't very clear
> as to which web servers it currently works on.  Does anyone know?

Instead of looking at the docs for the FastCGI module, look at the docs for the FastCGI protocol:

   http://www.fastcgi.com/

And yes, it does appear to support Iplanet.

> We've done nothing other than change the perl call to perperl, in terms of
> "adapting" our code to run persistently.

Could you show us a minimal perperl script which hangs in the manner
which you describe?

-- 
"So, who beat the clueless idiot today?"
"Well, we flipped for it, but when Kuno
 landed, he wasn't in any shape to fight."
"Next time, try flipping a *coin.*"


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

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


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