From bsides at towery.com Fri Mar 10 10:46:16 2000 From: bsides at towery.com (Brock Sides) Date: Thu Aug 5 00:07:10 2004 Subject: test Message-ID: test -- Brock Sides Unix Systems Administration Towery Publishing bsides@towery.com Phone (901)251-7007 Pager (800)946-4646 x1430707 From bsides at towery.com Fri Mar 10 11:06:25 2000 From: bsides at towery.com (Brock Sides) Date: Thu Aug 5 00:07:10 2004 Subject: test2 Message-ID: test2 -- Brock Sides Unix Systems Administration Towery Publishing bsides@towery.com ---------------------------------------------------------------------------- To Unsubscribe, please send an email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From bsides at towery.com Fri Mar 10 11:18:19 2000 From: bsides at towery.com (Brock Sides) Date: Thu Aug 5 00:07:10 2004 Subject: test 3 Message-ID: test 3 -- Brock Sides Unix Systems Administration Towery Publishing bsides@towery.com ---------------------------------------------------------------------------- To Unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From bsides at towery.com Fri Mar 10 11:28:07 2000 From: bsides at towery.com (Brock Sides) Date: Thu Aug 5 00:07:10 2004 Subject: [Memphis.pm] test 4 Message-ID: test 4 -- Brock Sides Unix Systems Administration Towery Publishing bsides@towery.com ---------------------------------------------------------------------------- To Unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From philarete at mindspring.com Fri Mar 10 21:15:34 2000 From: philarete at mindspring.com (Brock Sides) Date: Thu Aug 5 00:07:10 2004 Subject: [Memphis.pm] Hi Jim Message-ID: <38C9BA56.C4090B87@mindspring.com> Hi Jim, So far it's just me and you. I'd probably have a few more if I'd gotten that announcement to the golum list earlier in the day. I'm guessing Ed has the thing set to filter messages with "subscribe" in the body, which prevented me from sending email with instructions on subscribing to the memphis-pm-list. Hopefully I'll have the memphis.pm.org name set up soon, and we'll have a web page. Brock bsides@towery.com philarete@mindspring.com ---------------------------------------------------------------------------- To Unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From bsides at towery.com Mon Mar 13 12:47:17 2000 From: bsides at towery.com (Brock Sides) Date: Thu Aug 5 00:07:10 2004 Subject: [Memphis.pm] using md5 hashes for passwords Message-ID: First, I'd like to welcome to everyone subscribed to the Memphis Perl Mongers mailing list. There are eight people subscribed so far. I hope that this group will become an active one, holding meetings, doing presentations, having guest speakers, etc. At the very least, I hope the mailing list will become a useful resource for the Perl programmers in Memphis. Local lists, having lower volume, are a much safer place for new users (and experienced users) to ask questions without fear of the wrath of Tom Christiansen. :) I guess all of you heard about this through the GOLUM list. I'm sure there are a lot of Perl users out there who aren't into Linux as well, but I'm not sure how to reach them. Any suggestions? Anyway, here's a question to get us started. More an algorithms question than a Perl question, but the implementation lends itself to being done in Perl, as so many problems do. I'm sure we all know how to create and verify hashed passwords using Perl's built-in crypt function: # create hashed password my $plaintext = "password"; my $salt = &salt; # returns random two bytes of salt my $crypthash = crypt($plaintext, $salt); # verify password my $crypthash = "SA01VjfokepR."; my $plaintext = "password"; if ($crypthash eq crypt($plaintext, $crypthash)) { # it's the right password } However, this of course suffers from all the problems associated with Unix crypt(), such as an eight-byte limit on password length. If one wanted to go about using MD5 hashes instead, what would be the proper way to to that? You could just hash the password, like this: use Digest::MD5 qw(md5_base64); my $plaintext = "password"; my $crypthash = md5_base64($plaintext); But I have a feeling that you ought to be salting the hash somehow, to make it harder to build a dictionary, and make it more time-consuming to crack multiple passwords. (However, I note that the SHA hashes that Netscape Messaging Server uses to store passwords are not salted in any way.) Am I right? How is it done by Linux, if you're using MD5 passwords? Maybe something like this: # create hash use Digest::MD5 qw(md5_base64); my $plaintext = "password"; my $salt = &salt; # generate random N bytes of salt my $crypthash = $salt . ":" . md5_base64($salt . $plaintext); # verify password my $crypthash = "SALT:fXt+cRfLdw5YFJsibzeKFQ"; my $plaintext = "password"; my ($salt, $md5) = split ":", $crypthash; if ($md5 eq md5_base64($salt . $plaintext)) { # password is correct } Obviously I shouldn't be using : as a salt/hash delimiter, since it tends to be used as a username/password delimiter. But other than details like that, is this the proper algorithm? (I.e. How does Linux do it?) And are other sorts of hashes I could be using? SHA or MD2, I guess, since they're part of the Digest::MD5 package. What about Blowfish hashes? Anybody knowledgeable on the merits of various hashing algorithms? -- Brock Sides Unix Systems Administration Towery Publishing bsides@towery.com ---------------------------------------------------------------------------- To Unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From bsides at towery.com Mon Mar 13 15:29:36 2000 From: bsides at towery.com (Brock Sides) Date: Thu Aug 5 00:07:10 2004 Subject: [Memphis.pm] perl 5.6 RC1 Message-ID: [bsides@koala bin]$ ./perl -v This is perl, v5.6.0 built for i686-linux (with 1 registered patch, see perl -V for more detail) So, does anyone know what's new in this? -- Brock Sides Unix Systems Administration Towery Publishing bsides@towery.com ---------------------------------------------------------------------------- To Unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From cameronw at informix.com Wed Mar 15 10:29:56 2000 From: cameronw at informix.com (cameron walker) Date: Thu Aug 5 00:07:10 2004 Subject: [Memphis.pm] [Fwd: Re: [GOLUM] CGI: file upload widget processing] Message-ID: <38CFBA84.D9588F69@informix.com> > > How do you upload a file using HTML/CGI? > > Below are the guts of the HTML I wrote. What do I have to do within the > CGI to actually write out the contents of a choosen file onto the disk > of the server? So far all I can do is print out the name of the file but > none of the contents. > > > >
ENCTYPE="multipart/form-data"> > > > > >
> > >
>
> > Subscribe to Memphis.pm, post your question there, and I'll be happy to answer. ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From bsides at towery.com Thu Mar 16 14:59:13 2000 From: bsides at towery.com (Brock Sides) Date: Thu Aug 5 00:07:10 2004 Subject: [Memphis.pm] memphis.pm.org Message-ID: memphis.pm.org is in DNS, and is pointing at our web site. Not much to it yet, but I'll get info up about the list sometime today or tomorrow. We're also listed on the www.pm.org list of established groups, although we don't have a link yet to the web site. -- Brock Sides Unix Systems Administration Towery Publishing bsides@towery.com ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From bsides at towery.com Thu Mar 16 15:15:29 2000 From: bsides at towery.com (Brock Sides) Date: Thu Aug 5 00:07:10 2004 Subject: [Memphis.pm] [Fwd: Re: [GOLUM] CGI: file upload widget processing] In-Reply-To: <38CFBA84.D9588F69@informix.com> Message-ID: On Wed, 15 Mar 2000, cameron walker wrote: > > > > > How do you upload a file using HTML/CGI? > > > > Below are the guts of the HTML I wrote. What do I have to do within the > > CGI to actually write out the contents of a choosen file onto the disk > > of the server? So far all I can do is print out the name of the file but > > none of the contents. > > > > > > > >
> ENCTYPE="multipart/form-data"> > > > > > > > > > >
> > > > > >
> >
> > > > Do something like this: #!/usr/bin/perl -wT use CGI qw(param); use CGI::Carp qw(fatalsToBrowser); $tmpdir = '/tmp'; # probably a bad idea if (param('file')) { $filename = param('file'); $filename =~ /(.*[\\\/:])*(.*)/; # put the filename # minus the path in $2 # regex magic makes it work # on windows, mac, or unix # and makes taint checking happy $filesuffix = $2; binmode $filename; # needed on Win32 for binary files # superflous on a real OS open(TMPFILE, ">$tmpdir/$filesuffix") || die "Couldn't open temp file: $!"; binmode TMPFILE; # for Win32 while (<$filename>) { # automagically created filehandle print TMPFILE; } } print < will have a filehandle automagically associated with it which you can read from. -- Brock Sides Unix Systems Administration Towery Publishing bsides@towery.com ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From phil_groce at cmcsmart.com Thu Mar 16 15:23:28 2000 From: phil_groce at cmcsmart.com (Phil Groce) Date: Thu Aug 5 00:07:10 2004 Subject: [Memphis.pm] memphis.pm.org In-Reply-To: Message-ID: <4.2.2.20000316152007.00c26a60@calendar.cmcsmart.com> At 02:59 PM 3/16/00 -0600, you wrote: >memphis.pm.org is in DNS, and is pointing at our web site. Not much to it >yet, but I'll get info up about the list sometime today or tomorrow. >We're also listed on the www.pm.org list of established groups, although >we don't have a link yet to the web site. A thing of beauty and a joy forever. :) So, what's under the hood at the website? CGI? mod_perl? Don't tell me the Perl Mongers' website limits us to static pages. :) >Brock Sides phil ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From cameronw at informix.com Wed Mar 15 12:42:08 2000 From: cameronw at informix.com (cameron walker) Date: Thu Aug 5 00:07:10 2004 Subject: [Memphis.pm] [Fwd: Re: [GOLUM] CGI: file upload widget processing] References: Message-ID: <38CFD980.25547838@informix.com> Now for the next stupid question: Where do I get the CGI module referred to in the first couple lines? I presume that's what the 'use' is doing. > #!/usr/bin/perl -wT > > use CGI qw(param); > use CGI::Carp qw(fatalsToBrowser); > > $tmpdir = '/tmp'; # probably a bad idea > > if (param('file')) { > $filename = param('file'); > $filename =~ /(.*[\\\/:])*(.*)/; # put the filename > # minus the path in $2 > # regex magic makes it work > # on windows, mac, or unix > # and makes taint checking happy > $filesuffix = $2; > binmode $filename; # needed on Win32 for binary files > # superflous on a real OS > open(TMPFILE, ">$tmpdir/$filesuffix") || die "Couldn't open temp > file: $!"; > binmode TMPFILE; # for Win32 > while (<$filename>) { # automagically created filehandle > print TMPFILE; > } > } > > print < Content-type: text/plain > > Done! > FIN > > __END__ > > In other words, if you "use CGI", any file specified through TYPE=FILE> will have a filehandle automagically associated with it which > you can read from. > > -- > Brock Sides > Unix Systems Administration > Towery Publishing > bsides@towery.com > > ---------------------------------------------------------------------------- > To unsubscribe, please send email to majordomo@pm.org > with 'unsubscribe memphis-pm-list' in the body of the message. > ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From phil_groce at cmcsmart.com Thu Mar 16 17:18:09 2000 From: phil_groce at cmcsmart.com (Phil Groce) Date: Thu Aug 5 00:07:10 2004 Subject: [Memphis.pm] Where to find CGI (and other) modules In-Reply-To: <38CFD980.25547838@informix.com> References: Message-ID: <4.2.2.20000316171254.00a20ae0@calendar.cmcsmart.com> At 01:42 PM 3/15/00 -0500, you wrote: >Now for the next stupid question: > >Where do I get the CGI module referred to in the first couple lines? I presume >that's what the 'use' is doing. The CPAN (Comprehensive Perl Archive Network) contains this library and a few bajillion others. The most convenient place to search for a particular package is: http://search.cpan.org If you're using Red Hat or anothe RPM-friendly Linux, many packages come as RPM's, too. I don't know of a particular website, but in GNORPM, do a web find for perl-CGI.pm and you'll find it. (For a lot of other CGI packages, just look for perl-CGI.) phil ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From bsides at towery.com Thu Mar 16 17:22:14 2000 From: bsides at towery.com (Brock Sides) Date: Thu Aug 5 00:07:10 2004 Subject: [Memphis.pm] Re: CGI: file upload widget processing In-Reply-To: <38CFD980.25547838@informix.com> Message-ID: On Wed, 15 Mar 2000, cameron walker wrote: > > Now for the next stupid question: > > Where do I get the CGI module referred to in the first couple lines? I presume > that's what the 'use' is doing. It's a standard part of the perl distribution. One way to see if you have a module installed: [bsides@koala bsides]$ perl -MCGI -e 1 [bsides@koala bsides]$ perl -MNonexistant -e 1 Can't locate Nonexistant.pm in @INC (@INC contains: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 .). BEGIN failed--compilation aborted. Modules that you don't have installed, you fetch from CPAN. You can do this manually, by going to www.cpan.org, or by using the CPAN module, a standard part of the perl distribution: [bsides@koala bsides]$ perl -MCPAN -e shell Read the documentation on a module with "perldoc": [bsides@koala bsides]$ perldoc CGI -- Brock Sides Unix Systems Administration Towery Publishing bsides@towery.com ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From bsides at towery.com Thu Mar 16 17:29:03 2000 From: bsides at towery.com (Brock Sides) Date: Thu Aug 5 00:07:10 2004 Subject: [Memphis.pm] memphis.pm.org In-Reply-To: <4.2.2.20000316152007.00c26a60@calendar.cmcsmart.com> Message-ID: On Thu, 16 Mar 2000, Phil Groce wrote: > At 02:59 PM 3/16/00 -0600, you wrote: > >memphis.pm.org is in DNS, and is pointing at our web site. Not much to it > >yet, but I'll get info up about the list sometime today or tomorrow. > >We're also listed on the www.pm.org list of established groups, although > >we don't have a link yet to the web site. > > A thing of beauty and a joy forever. :) > > So, what's under the hood at the website? CGI? mod_perl? Don't tell me the > Perl Mongers' website limits us to static pages. :) Yes, we have CGI and mod_perl. It's hosted on hfb.pm.org ("happy fun ball", as in "Don't taunt the..."), a Sparc 20 running Solaris 7, with Apache 1.3.9 and perl 5.005_03. We have ssh/ftp access. -- Brock Sides Unix Systems Administration Towery Publishing bsides@towery.com ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From durango at linuxfiles.net Fri Mar 17 00:08:35 2000 From: durango at linuxfiles.net (Durango) Date: Thu Aug 5 00:07:10 2004 Subject: [Memphis.pm] TEST Message-ID: <007601bf8fd7$3a9a6200$1401a8c0@box2.home.linuxfiles.net> This is the pm list..... testing 123 Ray ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From uneven14 at hotmail.com Fri Mar 17 18:18:04 2000 From: uneven14 at hotmail.com (Matt Bledsoe) Date: Thu Aug 5 00:07:10 2004 Subject: [Memphis.pm] Submitting Form Data Message-ID: <20000318001804.51642.qmail@hotmail.com> I'm trying to make a perl script that will submit data to a cgi as if I had clicked a button on the web site to do the same. It's got me stumped and those two linux journal pages didn't help me much either. Any ideas? Matt BTW exactly how many people are on this list? I haven't seen much happening on it =) ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From sheff at pobox.com Fri Mar 17 18:36:15 2000 From: sheff at pobox.com (Keith W. Sheffield) Date: Thu Aug 5 00:07:10 2004 Subject: [Memphis.pm] Submitting Form Data References: <20000318001804.51642.qmail@hotmail.com> Message-ID: <38D2CF7F.97BF95DB@pobox.com> Matt Bledsoe wrote: > > I'm trying to make a perl script that will submit data to a cgi as if I had > clicked a button on the web site to do the same. It's got me stumped and > those two linux journal pages didn't help me much either. Any ideas? > > Matt > > BTW exactly how many people are on this list? I haven't seen much happening > on it =) well, for cgi programs that process the parameters using the GET method, the URL contains the parameters. The C and Perl CGI libraries/modules that I've seen can handle GET and POST, so if the program is using a library or module to extract the parameters, chances are that one can send data to the CGI program with either method. example http://someserver/cgi-bin/myform.cgi?var1=data1&var2=data2 You should also use the escape function that I believe is a part of CGI.pm to encode the data so spaces and other things are treated properly. The nice thing about GET, is that one can test it by just typing in the url or having it bookmarked. -- Oxymoron: Sure bet. Keith W. Sheffield sheff@pobox.com ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From philarete at mindspring.com Fri Mar 17 19:55:35 2000 From: philarete at mindspring.com (Brock Sides) Date: Thu Aug 5 00:07:10 2004 Subject: [Memphis.pm] Submitting Form Data References: <20000318001804.51642.qmail@hotmail.com> Message-ID: <38D2E217.7E1431C0@mindspring.com> Matt Bledsoe wrote: > > I'm trying to make a perl script that will submit data to a cgi as if I had > clicked a button on the web site to do the same. It's got me stumped and > those two linux journal pages didn't help me much either. Any ideas? > > Matt You need the libwww bundle. http://www.cpan.org/modules/by-module/Bundle/libwww-perl-5.47.tar.gz Then you do something like this: #!/usr/bin/perl -w use LWP::UserAgent; use HTTP::Request; use HTTP::Response; # The content of the POST or GET my $content='var1=foo&var2=baz&var3=quux'; my $ua = new LWP::UserAgent; my $request = new HTTP::Request 'POST', 'http://www.example.com/cgi-bin/foo.cgi'; $request->header('Content-type' => 'application/x-www-form-urlencoded'); $request->header('Content-length' => length($content) ); $request->add_content($content); # Or if you're doing a GET: # my $request = new HTTP::Request 'GET', "http://www.example.com/cgi-bin/foo.cgi&$content"; my $response = $ua->request($request); __END__ Then you've got the content returned by the cgi in $response. If you want to get really fancy, pick up the O'Reilly Pelican book, "Web Client Programming in Perl". libwww also includes GET, HEAD, and POST, which are free standing perl scripts installed into /usr/bin, and which let you knock out quick shell scripts, or do grab web content from the command line. I couldn't do without them. > BTW exactly how many people are on this list? I haven't seen much happening > on it =) There are 15 email addresses subscribed to the list. Two of which are mine. You can find this out by issuing the command "who memphis-pm-list" to majordomo@pm.org. Brock Sides bsides@towery.com philarete@mindspring.com ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From durango at linuxfiles.net Sat Mar 18 10:27:35 2000 From: durango at linuxfiles.net (Durango) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] installing mysql perl DBI librarys Message-ID: <02d301bf90f6$de5aa420$1401a8c0@box2.home.linuxfiles.net> Hi all, I have got MySQL loaded and working fine, but seem to have a problem getting the correct rpm's for the DBI::mysql loaded. Here are the files for the whole thing, I think I am a version or two off but these things seem to confuse me more right now. 255707 DBI-1_13-1_i386.rpm 148163 DBI-perl-bin-0_93-1_i386.rpm These two seem to be the same thing ( This is what has me confused ). 111651 mysql-DBI-perl-bin-1_825-1_i386.rpm This is the MySQL stuff 4915122 MySQL-3_22_32-1_i386.rpm 542024 MySQL-bench-3_22_32-1_i386.rpm Bench has dependencies for the top two DBI things... 2124034 MySQL-client-3_22_32-1_i386.rpm 631939 MySQL-devel-3_22_32-1_i386.rpm This was not really required. 186217 MySQL-shared-3_22_32-1_i386.rpm I have a side question: Should I just get the tarballs and just compile the whole thing, would I gain any performance? Would I have a better install? Ray PS - I hope this fits within the pm guidelines as a perl question, if not I apologize. ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From philarete at mindspring.com Sat Mar 18 21:37:56 2000 From: philarete at mindspring.com (Brock Sides) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] installing mysql perl DBI librarys References: <02d301bf90f6$de5aa420$1401a8c0@box2.home.linuxfiles.net> Message-ID: <38D44B94.73CACDDD@mindspring.com> Durango wrote: > I have got MySQL loaded and working fine, but seem to have a problem getting > the correct rpm's for the DBI::mysql loaded. > Here are the files for the whole thing, I think I am a version or two off > but these things seem to confuse me more right now. > > I have a side question: Should I just get the tarballs and just compile the > whole thing, would I gain any performance? Would I have a better install? > > Ray Yeah, the dependencies among the DBI/DBD modules get complex, and it doesn't help when there are half a dozen different versions of the RPMs floating around. Your best bet, since you have MySQL up and running, is to get the msql-mysql bundle and build the module yourself. http://www.cpan.org/modules/by-module/Bundle/Msql-Mysql-modules-1.2210.tar.gz Brock bsides@towery.com philarete@mindspring.com ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From durango at linuxfiles.net Sat Mar 18 22:28:07 2000 From: durango at linuxfiles.net (Durango) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] installing mysql perl DBI librarys Message-ID: <02e001bf915b$86e884e0$1401a8c0@box2.home.linuxfiles.net> >to get the msql-mysql bundle and build the module yourself. > >http://www.cpan.org/modules/by-module/Bundle/Msql-Mysql-modules-1.2210.tar. gz > Brock, I just happen to have 1.2209 and redid the install. ~ Looks good Warning: prerequisite Data::ShowTable 0 not found at (eval 14) line 220. Using DBI 1.13 installed in /usr/lib/perl5/site_perl/5.005/i386-linux/auto/DBI Writing Makefile for DBD::mysql Writing Makefile for Msql-Mysql-modules ~ The warning I think is ok..... DBI 1.13 was not install properly anyways that may have been my whole problem from the start. THANKS! Ray ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From durango at linuxfiles.net Sat Mar 18 22:40:42 2000 From: durango at linuxfiles.net (Durango) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] closer but still some things in wrong place (mysql.pm) Message-ID: <02e201bf915d$488931c0$1401a8c0@box2.home.linuxfiles.net> here is a copy of what im seeing: ~ [root@box1 gdchart]# ./mysqltest1.pl Can't locate mysql.pm in @INC (@INC contains: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 .) at ./mysqltest1.pl line 5. BEGIN failed--compilation aborted at ./mysqltest1.pl line 5. [root@box1 gdchart]# updatedb & [1] 17666 [root@box1 gdchart]# locate mysql.pm /home/raytant/gdchart/Msql-Mysql-modules-1.2209/mysql/lib/DBD/mysql.pm /home/raytant/gdchart/Msql-Mysql-modules-1.2209/mysql/lib/Bundle/DBD/mysql.p m /usr/lib/perl5/site_perl/DBD/mysql.pm ~ myslq.pm is installed - but @INC thinks its about 4 places it aint. The real mysql.pm is under a DBD directory. I'm lost. Ray ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From philarete at mindspring.com Sun Mar 19 10:12:51 2000 From: philarete at mindspring.com (Brock Sides) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] closer but still some things in wrong place (mysql.pm) References: <02e201bf915d$488931c0$1401a8c0@box2.home.linuxfiles.net> Message-ID: <38D4FC77.4684618@mindspring.com> Durango wrote: > [root@box1 gdchart]# ./mysqltest1.pl > Can't locate mysql.pm in @INC (@INC contains: > /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 > /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 .) > at ./mysqltest1.pl line 5. [root@box1 gdchart]# locate mysql.pm > /usr/lib/perl5/site_perl/DBD/mysql.pm You have two separate problems: (1) You should be calling the module as "use DBD::mysql" (so that perl looks in the DBD subdirectories of the @INC directories). (2) It's not going to find it anyway, because the DBD directory is not in a subdirectory of @INC. It's in /usr/lib/perl5/site_perl, not /usr/lib/perl5/site_perl/5.005. This is why you should either (a) stick with the perl and perl module RPMs that come with your distro, or (b) build your own modules from source. The RPMs are putting libs in a place perl doesn't expect to look. You fix this by pushing onto @INC in your scripts, but who wants to do that all the time? Build the module yourself, and it will be put in the right place. Brock bsides@towery.com philarete@mindspring.com ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From durango at linuxfiles.net Sun Mar 19 13:37:07 2000 From: durango at linuxfiles.net (Durango) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] things in wrong place (mysql.pm) or is DBD::mysql, hmmmmm it might be me! Message-ID: <02eb01bf91da$836510c0$1401a8c0@box2.home.linuxfiles.net> I fixed the problem by calling the corrected module DBD::mysql and using its calling techniques. The test script works now. :-) Gee - who would of thought there was about 1000 ways to do this. thanks..... if you do create your own - it intsall script looks for a file called pod2text: here it is: #!/usr/new/bin/perl eval 'exec /usr/new/bin/perl -S $0 ${1+"$@"}' if $running_under_some_shell; use Pod::Text; if(@ARGV) { pod2text($ARGV[0]); } else { pod2text("<&STDIN"); } For some reason , this script is needed for the install of Msql-Mysql-perl package... This version came from my powertools cd's which I have online. Ray ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From cameronw at informix.com Sun Mar 19 15:13:19 2000 From: cameronw at informix.com (cameron walker) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] 2 questions Message-ID: <38D542EE.E33C4BE5@informix.com> Brock, thanks for the answer on the file upload widget. I worked with perl a lot about 4 years ago and have just started working with it again. This 'use CGI' thing shows me just how much has been added. My old perl book, of course, has nothing about that call in there. Id guess there's a lot that it no longer covers at this point. With that in mind Im looking for reccomendations on an up-to-date perl book. One that covers the CGI module in depth would be nice but I can buy that seperately if neccessary. Thx ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From durango at linuxfiles.net Sun Mar 19 15:34:27 2000 From: durango at linuxfiles.net (Durango) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] 2 questions Message-ID: <02f201bf91ea$e71d5fe0$1401a8c0@box2.home.linuxfiles.net> Cameron, Messing with DBD::mysql (or that fact mysql.pm) the past couple days has taught me to go look at the actual .pm file, they are pretty explanatory. But I'm not saying don't buy a book - I own quite a few O'reilly books myself. Ray -----Original Message----- From: cameron walker To: memphis-pm-list@pm.org Date: Sunday, March 19, 2000 2:33 PM Subject: [Memphis.pm] 2 questions >Brock, > >thanks for the answer on the file upload widget. I worked with perl a >lot about 4 years ago and have just started working with it again. This >'use CGI' thing shows me just how much has been added. My old perl book, >of course, has nothing about that call in there. Id guess there's a lot >that it no longer covers at this point. > >With that in mind Im looking for reccomendations on an up-to-date perl >book. One that covers the CGI module in depth would be nice but I can >buy that seperately if neccessary. > >Thx > >--------------------------------------------------------------------------- - >To unsubscribe, please send email to majordomo@pm.org >with 'unsubscribe memphis-pm-list' in the body of the message. >--------------------------------------------------------------------------- - > ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From bsides at towery.com Mon Mar 20 09:29:13 2000 From: bsides at towery.com (Brock Sides) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] things in wrong place (mysql.pm) or is DBD::mysql, hmmmmm it might be me! In-Reply-To: <02eb01bf91da$836510c0$1401a8c0@box2.home.linuxfiles.net> Message-ID: Yeah, it's a crime that RH doesn't include pod2text by default, considering it's part of the standard perl distribution. (They include pod2html, pod2latex, and pod2man, but for some reason leave out pod2text.) -- Brock Sides Unix Systems Administration Towery Publishing bsides@towery.com On Sun, 19 Mar 2000, Durango wrote: > if you do create your own - it intsall script looks for a file called > pod2text: ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From bsides at towery.com Mon Mar 20 10:24:59 2000 From: bsides at towery.com (Brock Sides) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] 2 questions In-Reply-To: <38D542EE.E33C4BE5@informix.com> Message-ID: On Sun, 19 Mar 2000, cameron walker wrote: > Brock, > > thanks for the answer on the file upload widget. I worked with perl a > lot about 4 years ago and have just started working with it again. This > 'use CGI' thing shows me just how much has been added. My old perl book, > of course, has nothing about that call in there. Id guess there's a lot > that it no longer covers at this point. > > With that in mind Im looking for reccomendations on an up-to-date perl > book. One that covers the CGI module in depth would be nice but I can > buy that seperately if neccessary. > > Thx I'm assuming your old perl book doesn't cover release 5, which is where modules were introduced. There are lots of good perl books out there. Ones I can recommend, off the top of my head: Programming Perl (the Camel book), by Wall, Christiansen, and Schwartz. Learning Perl, by Christiansen and Schwartz. Effective Perl Programming, by Schwartz. The Perl Cookbook, by Christiansen. Advanced Perl Programming, by Srinivasan. If you can only buy one, get the Perl Cookbook, especially if you already know the basics of the language. It'll teach you the Perl idioms, so your programs don't look like they were written in C. (Remember the old joke, "A good Fortran programmer can write Fortran programs in any language.") I can't personally recommend it, since I haven't read it, but Lincoln Stein, the author of CGI.pm, has written "The Official Guide to Programming with CGI.pm". And don't forget that perl itself, and almost all of its modules, come with extensive documentation. Start out with "perldoc perldoc and "perldoc perl", and go from there. If you'd like nice printable versions, run the pod files (e.g. /usr/lib/perl5/5.00503/pod/perl.pod) through pod2html. The pod documentation for the modules is contained in the .pm files themselves. There's not really that much to CGI programming per se. Parse the query string (done automatically for you by CGI::param), write to standard out, and use the -T flag to turn on taint checking. (See the perlsec man page.) I personally find the full blown OO interface provided with CGI.pm to be overkill. All I use is "CGI qw(param)" to parse the query string and "CGI::Carp qw(fatalsToBrowser)" so I don't have to pick through the web server logs to get the error messages. -- Brock Sides Unix Systems Administration Towery Publishing bsides@towery.com ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From mhoward at mersh.com Mon Mar 20 12:43:03 2000 From: mhoward at mersh.com (Michael Howard) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] Off Subject Message-ID: <38D67137.AD0ADD6@mersh.com> Does anybody know how to get in touch with Ed? The GOLUM email is dead.. and we kinda need it right now so we can get organized for this weekends Market Pro Show.. thanks michael ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From dysan_2000 at hotmail.com Mon Mar 20 13:08:04 2000 From: dysan_2000 at hotmail.com (Big Ed) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] Off Subject Message-ID: <20000320190804.77338.qmail@hotmail.com> What do you mean 'dead'? It's been working since I fixed it this morning ;) I sent a message to the list as to why. >From: Michael Howard >Reply-To: memphis-pm-list@pm.org >To: perl >Subject: [Memphis.pm] Off Subject >Date: Mon, 20 Mar 2000 12:43:03 -0600 > >Does anybody know how to get in touch with Ed? The GOLUM email is >dead.. and we kinda need it right now so we can get organized for this >weekends Market Pro Show.. > >thanks >michael > >---------------------------------------------------------------------------- >To unsubscribe, please send email to majordomo@pm.org >with 'unsubscribe memphis-pm-list' in the body of the message. >---------------------------------------------------------------------------- > ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From dysan_2000 at hotmail.com Mon Mar 20 13:35:35 2000 From: dysan_2000 at hotmail.com (Big Ed) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] AUTOLOAD function Message-ID: <20000320193536.21176.qmail@hotmail.com> I knew I was forgetting something for you, Brock. Here's a basic AUTOLOAD function: sub AUTOLOAD { my $self = shift; (my $a = $AUTOLOAD) =~ s/.*:://g; @_ ? $self->{$a} = shift : return $self->{$a}; } } This is called when you do something like: $object->a() It will give you the value of 'a'. $object->a('Foo') will set the value of 'a' to 'Foo'. ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From bsides at towery.com Tue Mar 21 09:56:36 2000 From: bsides at towery.com (Brock Sides) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] Re: golum mail list In-Reply-To: <20000321150844.5565.qmail@ww156.netaddress.usa.net> Message-ID: I've left Ed voice mail, asking him what's going on. Of course, he may get this email before he gets the voicemail. :) If we can get a list of subscribers (which I can't at the moment, as majordomo@golum.org is not responding to "who" commands either), we can send out a mailing to everyone and move planning for the Market Pro show over to the Memphis.pm list. -- Brock Sides Unix Systems Administration Towery Publishing bsides@towery.com On 21 Mar 2000, Michael Howard wrote: > Any Idea what is up with the Golum email list? > > Ed said that he sent out a msg saying what was wrong with it. I never got it.. > This kinda sucks since we are doing the Market Pro thing this weekend.. we > are going to be very unorganized... > > michael ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From dysan_2000 at hotmail.com Tue Mar 21 10:29:11 2000 From: dysan_2000 at hotmail.com (Big Ed) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] Re: golum mail list Message-ID: <20000321162911.72156.qmail@hotmail.com> Nope.. got the voicemail first. :) Just letting you all know that sendmail is pounding out every message it's been sent over the past day. Seems that DNS wasn't resolving. *Shrug* But it held the messages, so ya'll should be getting plenty of mail shortly. >From: "Brock Sides" >Reply-To: memphis-pm-list@pm.org >To: Michael Howard >CC: memphis-pm-list@pm.org >Subject: [Memphis.pm] Re: golum mail list >Date: Tue, 21 Mar 2000 09:56:36 -0600 (CST) > >I've left Ed voice mail, asking him what's going on. Of course, he may >get this email before he gets the voicemail. :) If we can get a list >of subscribers (which I can't at the moment, as majordomo@golum.org is not >responding to "who" commands either), we can send out a mailing to >everyone and move planning for the Market Pro show over to the Memphis.pm >list. > >-- >Brock Sides >Unix Systems Administration >Towery Publishing >bsides@towery.com > >On 21 Mar 2000, Michael Howard wrote: > > > Any Idea what is up with the Golum email list? > > > > Ed said that he sent out a msg saying what was wrong with it. I never >got it.. > > This kinda sucks since we are doing the Market Pro thing this weekend.. >we > > are going to be very unorganized... > > > > michael > >---------------------------------------------------------------------------- >To unsubscribe, please send email to majordomo@pm.org >with 'unsubscribe memphis-pm-list' in the body of the message. >---------------------------------------------------------------------------- > ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From phil_groce at cmcsmart.com Tue Mar 21 10:38:49 2000 From: phil_groce at cmcsmart.com (Phil Groce) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] AUTOLOAD function In-Reply-To: <20000320193536.21176.qmail@hotmail.com> Message-ID: <4.2.2.20000321093259.00b87ba0@calendar.cmcsmart.com> At 01:35 PM 3/20/00 -0600, Big Ed wrote: >I knew I was forgetting something for you, Brock. Here's a basic AUTOLOAD >function: > >sub AUTOLOAD { > my $self = shift; > > (my $a = $AUTOLOAD) =~ s/.*:://g; > @_ ? $self->{$a} = shift > : return $self->{$a}; > } >} Two things to remember about AUTOLOAD: 1. It's not really relevant to this application, but if you don't have a DESTROY method defined when Perl decides to nuke your object, it calls AUTOLOAD. If you don't want this, define an empty DESTROY. 2. If you're inheriting from another object, you're probably better off not using this technique. (Of course, some would say you're better off not using inheritance. :) For one thing, the child class's AUTOLOAD will be called before any methods in the parent class, so you'll have to make sure AUTOLOAD doesn't handle them. So if you want to inherit from an object with the single public method print(), but you want to auto-get/set everything else: sub AUTOLOAD { my $self = shift; (my $a = $AUTOLOAD) =~ s/.*:://g; if ($a =~ /print/) { return $self->SUPER::print; } else { @_ ? $self->{$a} = shift : return $self->{$a}; } } I don't know how this affects a parent class's private methods; probably badly, since Perl doesn't allow explicit casting -- it'll start looking in the child object's namespace, regardless. You also have to protect the parent's data from being corrupted, in about the same way. (It can also corrupt your data, too, I suppose, but it's less of danger.) To handle this with any certainty you either have to know details about the parent's implementation, or it has to explicitly give you a place to store your instance data. All that said, this is a pretty neat trick. It breaks for inheritance, but most of the OO Perl I do uses aggregation to pretty much the same effect. If you're writing something to get a job (or a prototype) done quickly, this saves you a lot of time. If you're planning to release something, or change its implementation to inherit from another object, I'd go with explicit accessor/mutator methods. Sorry for the dissertation. :) phil ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From jgreer at midsouth.rr.com Sat Mar 25 16:59:15 2000 From: jgreer at midsouth.rr.com (Jim Greer) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] pod2test Message-ID: <20000325165915.C23550@kafka.greer.local> Jason, I'm sorry we missed each other on Friday - I'm sure your illness had nothing to do with the beers you had later that evening. Or the gorgeous weather on Friday. Any plans to include pod2text as part of the Perl RPM in RH 6.X? Jim G -- I worked in a health food store once. A guy came in and asked me, "If I melt dry ice, can I take a bath without getting wet?" -- Steven Wright gpg fingerprint = B06E 66CF 31B2 89B7 25ED 2923 01E3 057E 4565 F02D ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From jcooper at redhat.com Mon Mar 27 08:28:20 2000 From: jcooper at redhat.com (Jason Cooper) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] Re: pod2test In-Reply-To: <20000325165915.C23550@kafka.greer.local> Message-ID: > Jason, > > I'm sorry we missed each other on Friday - I'm sure your illness had nothing > to do with the beers you had later that evening. > Or the gorgeous weather on Friday. don't I wish, although it did have something to do with the gorgeous weather causing the pollen to come out 2 weeks earlier than usual. :) > Any plans to include pod2text as part of the Perl RPM in RH 6.X? Its in the perl RPM for Red Hat Linux 6.2 -Jason ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ---------------------------------------------------------------------------- From dysan_2000 at hotmail.com Tue Mar 28 16:04:10 2000 From: dysan_2000 at hotmail.com (Big Ed) Date: Thu Aug 5 00:07:11 2004 Subject: [Memphis.pm] Announcement Message-ID: <20000328220410.634.qmail@hotmail.com> Hey all.. I stuck an announcement of the MemphisPM group on the GOLUM site, along with a link towards the bottom. -Ed ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com ---------------------------------------------------------------------------- To unsubscribe, please send email to majordomo@pm.org with 'unsubscribe memphis-pm-list' in the body of the message. ----------------------------------------------------------------------------