Re: catnip.local (redirect)
Gregg R.Allen wrote: I'm not sure where it's being stored, it's probably being cached in the browser somewhere. If you edit the file /etc/hosts and place an entry such as: catnip.local12.34.56.78 where 12.34.56.78 is the IP address of catnip.company.com. This can be discovered by either nslookup catnip.company.com or dig catnip.company.com The computer might need to be rebooted after editing the hosts file. You shouldn't need a reboot. Also... just as an idea, did you check that the links aren't hard coded? The difference is that a link such as: a href=/some/path/file.html will be requested from the root directory of the current domain, while a href=http://catnip.local/some/path/file.html; would request the file from the host catnip.local. This likely to trivial of a solution, just thought I'd ask. Unfortunately, many of the links automatically convert too URLs beginning catnip.local. Via VPN (the way she does it), there is no catnip.local. If that's not the issue, you could try the host file as mentioned previously, also apache has it's own host configuration directives in /etc/httpd/httpd.conf -- cs
Re: Reading in a File
Doug McNutt wrote: At 22:44 -0500 12/25/04, Lola Lee wrote: Nothing happens. This lesson that I'm working on is working from the premise that people are using a Windows Perl installation. Watch out for line ends in the source file that is being counted. Perl probably doesn't care because the return-linefeed pair from Windoze still contains the single linefeed that UNIX expects. But I have been fooled, especially with Unicode's two new code points representing line ends. Also, I believe that the snippet suggested could stop if there is a blank line in the file! Although, it would still contain a linefeed, I rarely trust interpretation of such. while (defined($line = )) I prefer this method: while ($line = ) { next if ($line =~ /^\s*$/); } -- cs
Re: File creation issue
Adam Butler wrote: I forgot to mention that $file is set via a form. On first run of the script, it prints a form to the browser asking for a file name, which you enter, and then it's submited and sent to the script. The way I understood it, when open tries to open a file that doesn't exist, it creates it. Thanks, The source of $file doesn't really matter, but I hope you are sanitizing that input! Open(GAMELOG, $file); @entries = GAMELOG; close(GAMELOG); This snippet will not create the file if it doesn't exist. As mentioned before, you can open a file for read or write. When opening for write, the file will be created if it does not exist but what would be the point of this if you are only reading the file? If this is actually what you want, add a test routine that creates the file if it doesn't exist: if (!( -f $file )) { # create the file open(FH, $file); close(FH); } open(GAMELOG, $file) || die $!\n; @entries = GAMELOG; close(GAMELOG); If you want to just test for the file instead of creating it too: if ( -f $file ) { open(GAMELOG, $file) || die $!\n; # you may still die with permission problems even though it exists. @entries = GAMELOG; close(GAMELOG); } -- cs You've had your answer. in your script 'Open' means nothing and the file won't be created even if you use 'open'. #!/usr/bin/perl chdir /tmp; $log = game.log; open LOG, $log or die $!; # --- ! print LOG success !; close LOG; open LOG, $log; for (LOG) { print }; Make it a rule NEVER to open a filehandle without testing. JD
Re: File creation issue
On Thursday 23 December 2004 11:27 pm, Adam Butler wrote: For some reason, when I try to use the open() function to create a new file, it doesn't work. It will open a pre-existing file just fine, but if you enter a file that doesn't exist, instead of creating a new one it simply does nothing. First thing you should do is get perl to tell you why it can't open the file: open(FH, /path/to/file) || die $!\n; Most likely it's a permission problem - die $!\n will report something like: Permission denied - You do not have permission to open the file. No such file or directory - File does not exist or path to file is wrong. Are you trying to append to a file or write over it or just read it? To append to a file open it like this: open(FH, /path/to/file) || die $!\n; To overwrite the file: open(FH, /path/to/file) || die $!\n; To simply read from the file: open(FH, /path/to/file) || die $!\n; Cheers! -- cs
Re: New to list, greetings and a (newbie)problem
On Wednesday 22 December 2004 04:35 pm, Isaac Sherman wrote: tcsh: hw.pl: Command not found. Welcome to perl on OSX! perl hw.pl works because perl is in your path and you are giving it hw.pl as an argument. Unfortunately, even after setting PATH, it still gives the same error, whether I type ./hw.pl or just hw.pl. You probably want to be able to just execute your scripts instead of directly invoking the interpreter. After all - that's what #!/usr/bin/perl is for. 1) Make sure you have execute permissions on your script: $ chmod 755 ./hw.pl 2) Find out where perl really is: $ which perl Although I'm certain it should be /usr/bin/perl, perhaps something is different on you system. The fact that perl hw.pl works indicates that perl is there and in your path. which will output it's location. If it is not /usr/bin/perl, you can either change your shebang (#!/usr/bin/perl) to reflect it's actual location or sym link it: $ ln -s /path/to/perl /usr/bin/perl Happy coding! -- cs
Re: Converting PDF to JPEG
As a perl solution, I've had success with perl and image magick, converting PDFs to JPEG. On 5/15/04 4:05 PM, Rich Morin [EMAIL PROTECTED] wrote: At 11:51 AM -0700 5/15/04, Dan Dulay wrote: As Mac-only solution, you should look at the Applescript Image Events. Thanks; that's _exactly_ the ticket! I can easily create a script to run that command over a set of files (being careful to make sure that they are stable first). Thanks also to Jerry LeVan; it appears that GC has been updated to handle PDFs (though I could find no mention of this on their web site). Lacking Applescript Image Events, I would have gone that way, fer sure. -r
Re: Merging into Address Book
On 4/7/04 7:23 PM, Ken Williams [EMAIL PROTECTED] wrote: On Apr 7, 2004, at 9:11 AM, Bill Jastram wrote: Ken: Although it's not a Perl soultion, here's a link which might give you just what you need: http://www.macosxhints.com/article.php? story=20030831221023355query=vcard Hmm - I'm a little hesitant to use that (or a perl equivalent), as it doesn't seem like it handles any of the complexities of the vCard format. For what it's worth, that looks like a better solution than running palm desktop... Add a little perl voodoo and you've got a pretty solid tool. C
Re: Getting the size of a folder with Mac::Glue
What ever happened to portability of code. Not to slag Mac::Glue but even the name suggests that your going to spend decades re-writing code should you need to move to a different platform. I can see it's purpose from some of the other threads here when working with iTunes or something but in this case, use the standard perl/system functions. As someone else pointed out: $size = `du -sk $dir`; Would do the trick nicely. On 3/16/04 7:03 AM, Jeff Lowrey [EMAIL PROTECTED] wrote: At 01:48 AM 3/16/2004, Rick Measham wrote: I'm trying to get the size of a folder and figure Mac::Glue would be the way to go. However I'm getting back a 0: my $size = $finder-data_size($monthdir/$folder/); print $size; From my own mistakes with Mac::Glue, I'm guessing you need to add a -get() somewhere in there. Like my $size = $finder-data_size($monthdir/$folder/)-get(); -Jeff
Re: Undefined subroutine main::sendmail
Did you try typing o conf urllist push ftp://myurl/ ? ftp://myurl/ is not an actual url. It's telling you Put _your_ url here. If that doesn't work (okay, it might not be intuitive), try this: mv ~/.cpan ~/.cpan_BROKEN sudo perl -MCPAN -e shell and then let things re-initialize. Or simply `o conf init' at the CPAN prompt. No need to be moving things around. This will allow you to configure CPAN, where you can select your sources, first by geographical region, then by source. Here's what it looks like from start to finish (please not that '%','#','cpan' refer to the shell prompts and should not be typed: ** NOTE: If you don't have a root password or don't know what it is, please search for Mac OSX set root password or similar in google http://www.google.ca % su Password: Enter you root password here. # perl -MCPAN -eshell cpan o conf init . cpan config stuff. Accept the defaults (hit return) until you get to either a prompt to use an existing MIRRORED.BY database or fetch a new one If it asks you if you want to use a MIRRORED.BY database that exists on your system and you accept the default yes ([y]) you will not be prompted to change your sources. So hit `n' here and `return'. You will then see this: First, pick a nearby continent and country (you can pick several of each, separated by spaces, or none if you just want to keep your existing selections). Then, you will be presented with a list of URLs of CPAN mirrors in the countries you selected, along with previously selected URLs. Select some of those URLs, or just keep the old list. Finally, you will be prompted for any extra URLs -- file:, ftp:, or http: -- that host a CPAN mirror. (1) Africa (2) Asia (3) Central America (4) Europe (5) North America (6) Oceania (7) South America Select your continent (or several nearby continents) [] Select your region, mine is (5) North America so I hit `5' and `return'. It then breaks it down further: (1) Canada (2) Mexico (3) United States Select your country (or several nearby countries) [] Again select the option appropriate for you. Which will then give you a list of sources in that region: (1) ftp://cpan.chebucto.ns.ca/pub/CPAN/ (2) ftp://cpan.mirror.cygnal.ca/pub/CPAN/ (3) ftp://cpan.sunsite.ualberta.ca/pub/CPAN/ (previous pick) (4) ftp://ftp.nrc.ca/pub/CPAN/ (previous pick) (5) ftp://theoryx5.uwinnipeg.ca/pub/CPAN/ (previous pick) Select as many URLs as you like (by number), put them on one line, separated by blanks, e.g. '1 4 5' (or just hit RETURN to keep your previous picks) [] It is beneficial to select multiple sources from this list so that if one fails it will skip to the next. Choices should be space delimited, meaning a space between each choice. I've had problems with some on the list so I type `3 4 5' and hit `return' If you know of another URL that you would like to use that was not on the list you can now enter it or simply hit `return' to continue: Enter another URL or RETURN to quit: [] This is the last step in configuring cpan and you will now be back at the cpan prompt. Note that if your region does not come up with many sources, you can select multiple countries or even multiple continents the same way you select multiple sources. Hope this helps. Cheers, cschilbe
Re: CPAN -- why always so long?
# perl -MCPAN -eshell Cpan o conf init This will allow you to configure CPAN, one of the steps is to select FTP sites. You can select based on geographical region and can also enter your own. I've never had a problem with speed and usually select multiple sites when configuring. ... Checking validity of my statements ... Actually appears that some of the hosts in my list are unreachable, taking some time to get a list of hosts... It tries LWP twice, presumably passive and non passive, then Net::FTP twice, then goes to the next host. Not a bad idea to update your sources once in a while I guess. C On 3/5/04 9:08 AM, Joseph Alotta [EMAIL PROTECTED] wrote: It goes through all the ftp sites you have listed and tries to find on that will allow logins. Does anyone know how to reset the list of ftp sites? Which ones are most available? Joe. On Mar 5, 2004, at 3:04 AM, John Delacour wrote: I've been meaning to ask this question for months but never got round to it. Why is it that when I try to use cpan for the first time after a little while it takes an age for it to contact the sites and get going? I always have to go away and do something else and it might take 5 minutes for cpan to sart doing anything useful. Here's a typical transcript of what happens before the long wait: CPAN: Storable loaded ok Going to read /Users/jd/.cpan/Metadata Database was generated on Wed, 03 Mar 2004 05:50:41 GMT CPAN: LWP::UserAgent loaded ok Fetching with LWP: ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz LWP failed with code[400] message[FTP return code 000] Fetching with Net::FTP: ftp://ftp.perl.org/pub/CPAN/authors/01mailrc.txt.gz JD
Re: Advice for moving perl script to OSX server
Apache is standard under OSX. And, yes, supports .htaccess files. If you are running this on Linux already, the transition should be simple. - Configure apache - Copy over scripts - Create .htaccess and .htpasswd files (or whatever you specify in configuration) - Go to town Apache has many other authentication modules that may suit your needs. As OSX is *nix at heart, there are several options for authentication really. Not to mention FREE. You can find apache auth modules by searching for authentication here: http://modules.apache.org/search There is no reason you should need to purchase a license to do authentication. Cheers, Conrad Schilbe On 3/1/04 10:41 AM, Eric Curts [EMAIL PROTECTED] wrote: Greetings! I am the technology specialist for North Canton City Schools in North Canton, Ohio. For years we have been using a perl script I wrote that helps teachers to develop home pages. Recently we have begun sharing this script with other school districts in our county so they could help their teachers as well. However, two of the districts use OSX for their web server. Here is where I need a push in the right direction... For us we run the script on a Linux server running Apache. Another district we have helped runs it on a Windows 2000 server. So far so good. I am wanting to give this script to the Mac districts but need help with the issue of authentication. Since school districts have hundreds of employees, it is easier to tap into an already existing password file, rather than have the staff create new usernames and passwords to use the homepage script. On our Linux server I use the built-in htaccess feature to handle the authentication. The htaccess file protects the folder holding the script. When a teacher tries to access the script, htaccess prompts them for a username and password. I then have configured the htaccess file to look at the already existing password file on the server (which is also used for their email accounts) and it authenticates them. On the Windows 2000 server we did a similar thing. We used Windows built-in ability to set privileges to protect the folder with the scripts. We then used Windows built-in basic authentication to tap into Active Directory to authenticate the teachers. What I am wondering is if there is some kind of built-in authentication for OSX. If so, where can I get more information on it? Does it sound like I will be able to use it as I have done with the other operating systems (that is point it to some already existing username/password system)? If that does not work, I also understand that Apache can be set up on an OSX server. Is this correct? Would that be a reasonable solution to the authentication problem, since then I could use htaccess as before? Any advice would be greatly appreciated. I apologize if some of my comments or questions are not clear as I have never worked with a Mac server before. We are just trying to help out some neighboring schools. Thanks! Eric * Eric Curts * Technology Specialist, North Canton City Schools * [EMAIL PROTECTED] * (330) 497-5600 x377 * FAX (330) 497-5618 * * Give a man a fish and you feed him for a day; * teach him to use the Net and he won't bother you for weeks.
Re: XML::Parser isn't working on OX 10.3.2
I have XML::Parser installed... Used CPAN... /usr/local/lib/libExpant.dylib doesn't exist on my system, Maybe it's supposed to be libExpat, without the 'n'? Source issue? C On 2/3/04 4:02 PM, Noah Hoffman [EMAIL PROTECTED] wrote: Hello, I've just upgraded our build machines from 10.2.8 to 10.3.2 and now all of my perl scripts are broken. It seems XML::Parser is the culprit, I'm gettting an error of: Can't load '/usr/local/lib/libExpant.dylib' formodule XML::Parser::Expat: /usr/local/lib/libexpat.dylib(2): Not a recognisable object file at /Library/Perl/XML/Parser.pm line 14 I've tried reinstalling the Parser module with no luck. Does anyone have any ideas here? Thanks, Noah
Re: ***regular expression***
On 11/17/03 2:52 AM, xweb [EMAIL PROTECTED] wrote: Thanks all but... I don't explain well the problem! So, i'm processing a very big text file ( from A DB ) in this format number|field 1|field2| field 3| etc. Every line is a record.Every line contains many url. I'm interested about specific url and i don't consider the others. while ( $line =~ s/href=\([^]+)\//) { $url = $1; ###ALL URL# if ($url =~ m/\/[^,]+,([^,]+),([^,]+),[^,]+\.html?$/) { ($var1,$var2)=($1,$2); ###INTERESTING URL AND VALUES } } In this way i obtain two values that interested me! It's works! Now i must substitute these url a href=$urlthe_link /a with idlink=$var2the_link/idlink and then i write to a new file with this substitution on all the field of file! Can you help me? The only thing you haven't captured is `the_link`. open (FH, path/to/new/file) || die $!\n; # open new file to write to while ( $line =~ /a href=\([^]+)\.*?(.*?)\/a/) { $url = $1; ###ALL URL# $the_link = $2; if ($url =~ m/\/[^,]+,([^,]+),([^,]+),[^,]+\.html?$/) { ($var1,$var2)=($1,$2); ###INTERESTING URL AND VALUES print FH idlink=$var2$the_link/idlink; # print to new file } } close(FH)
Re: ***regular expression***
I think this is what you are looking for: $string =~ s/\a\s*href\=\(.*?)\\.*?\\/a\/\idlink\$1/; If you want to capture the link text as well, put brackets around the 2nd '.*?' and reference it as $2. Hope that's what you are after. Conrad On 11/14/03 8:25 AM, xweb [EMAIL PROTECTED] wrote: Can someone help me about a regular ? In which way i can substitute a href=$urlstring/a with idlink$val1. Thanks Paolo
Re: Back with Make file errors AGAIN...
It would help if you send the output from make to see where it went wrong but I would assume that the early threads on this would help you. You may also want to use CPAN as root. This thread may help: http://www.mail-archive.com/[EMAIL PROTECTED]/msg05736.html Conrad On 11/14/03 12:07 AM, Myth [EMAIL PROTECTED] wrote: What would a new operating system be without the old problems from yesteryear creeping back into the mix. New G5, 10.3 installed, running 5.8.1, and when attempting to CPAN anything I continually get: Running make test Make had some problems, maybe interrupted? Won't test Running make install Make had some problems, maybe interrupted? Won't install Bundle summary: The following items in bundle Bundle::DBI had installation problems: My config.pm reads: 'build_cache' = q[10], 'build_dir' = q[/Users/me/.cpan/build], 'cache_metadata' = q[1], 'cpan_home' = q[/Users/me/.cpan], 'dontload_hash' = { }, 'ftp' = q[/usr/bin/ftp], 'ftp_proxy' = q[], 'getcwd' = q[cwd], 'gpg' = q[], 'gzip' = q[/usr/bin/gzip], 'histfile' = q[/Users/me/.cpan/histfile], 'histsize' = q[200], 'http_proxy' = q[], 'inactivity_timeout' = q[0], 'index_expire' = q[1], 'inhibit_startup_message' = q[0], 'keep_source_where' = q[/Users/me/.cpan/sources], 'lynx' = q[], 'make' = q[/usr/bin/make], 'make_arg' = q[], 'make_install_arg' = q[''], 'makepl_arg' = q[], 'ncftp' = q[], 'ncftpget' = q[], 'no_proxy' = q[], 'pager' = q[/usr/bin/less], 'prerequisites_policy' = q[ask], 'scan_cache' = q[atstart], 'shell' = q[/bin/bash], 'tar' = q[/usr/bin/tar], 'term_is_latin' = q[1], 'unzip' = q[/usr/bin/unzip], What is my innocent mind doing wrong this time? I've installed the Developer Tools. I've read a hundred threads on how to rewrite my config, and no change is in sight. Many thanks to whatever pour soul comes to my rescue. Best, Mark
Re: Perl version of GetFileInfo?
On 10/31/03 4:41 PM, William H. Magill [EMAIL PROTECTED] wrote: The application: GetFileInfo on the Developers (Xcode) CD functions differently between 10.2.x and 10.3.x. Under Jaguar GetFileInfo directory worked, Under Panther it returns the message: /Developer/Tools/GetFileInfo could not be used to display info about folder Is there a Perl work around? I found this from a google search: use MacOSX::File::Info; my $info = MacOSX::File::Info-get(...); print Creator is . $info-creator . \n Set info about a file $info-creator( 'R*ch' ); Here's the CPAN page for MacOSX::File::Info http://search.cpan.org/~dankogai/MacOSX-File-0.66/Info/Info.pm Description states this: This module implements what /Developer/Tools/{GetFileInfo,SetFile} does within perl. Conrad Schilbe
Re: Perl version of GetFileInfo?
On 10/31/03 5:08 PM, Conrad Schilbe [EMAIL PROTECTED] wrote: On 10/31/03 4:41 PM, William H. Magill [EMAIL PROTECTED] wrote: The application: GetFileInfo on the Developers (Xcode) CD functions differently between 10.2.x and 10.3.x. Under Jaguar GetFileInfo directory worked, Under Panther it returns the message: /Developer/Tools/GetFileInfo could not be used to display info about folder Is there a Perl work around? I found this from a google search: use MacOSX::File::Info; my $info = MacOSX::File::Info-get(...); print Creator is . $info-creator . \n Set info about a file $info-creator( 'R*ch' ); Here's the CPAN page for MacOSX::File::Info http://search.cpan.org/~dankogai/MacOSX-File-0.66/Info/Info.pm Description states this: This module implements what /Developer/Tools/{GetFileInfo,SetFile} does within perl. Conrad Schilbe I jumped too soon. I tested the MacOSX::File install under Panther and it failed with these errors: ork/Headers/CarbonCore.h:113, from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21, from /Developer/Headers/FlatCarbon/Files.h:1, from Catalog.xs:16: /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.fram ework/Headers/Debugging.h:285:2: #else without #if /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.fram ework/Headers/Debugging.h:287:2: #endif without #if /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.fram ework/Headers/Debugging.h:301:1: missing binary operator before token enum Catalog.c:313:1: unterminated #if make[1]: *** [Catalog.o] Error 1 make: *** [subdirs] Error 2 /usr/bin/make -- NOT OK I tried using gcc 2.95 instead of 3.3 and got further but still errored... I don't have time right now to try and debug it but maybe later. --- Conrad Schilbe
Re: DBD::mysql fails tests
On 10/29/03 10:33 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Conrad, thanks for the tip. However, to clarify, I was already trying to install via CPAN as root, and I've double checked that there's no password on the MySQL root account. Since my earlier post, I've done a little more digging and found some people on the perl list at mysql.com who have had the same problem with the DBD::mysql tests. So barring any other ideas, I'm just going to assume these errors are meaningless and go ahead and force install. Still, Conrad... I saw from an earlier thread here that you were able to install DBD::mysql, using Apple's install of perl, without any problems. I'm assuming it passed 'make test' for you? What version of gcc were you using? I used 3.3. But I'm using Mysql 3.x - Could be the difference. thanks, ken On Oct 29, 2003, at 11:45 AM, Conrad Schilbe wrote: On 10/29/03 12:33 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi all, I've been having trouble installing DBD::mysql on a fresh install of Panther, even after having patched Config.pm as Edward Moy suggested on this list a couple weeks ago. Specifically, 'make test' spits back the following: t/mysqlFAILED tests 46-48 Failed 3/68 tests, 95.59% okay All other tests pass with flying colors. This is with MySQL 4.0.16. Anyway, so I googled around a bit, and it turns out this problem was mentioned here exactly once before (see http://www.mail-archive.com/[EMAIL PROTECTED]/msg05466.html). My question is, is anyone else having the same problem besides the two of us? It seems a little suspicious that there'd be nothing else on the googlable web about DBD::mysql failing these tests, if the problem were universal. Perhaps there's something unique to Juan's configuration and my own that is causing problems with this test? I'm relatively new to Perl and MySQL, but I seem to recall reading somewhere that DBD::mysql prefers a perl built without multi-threading. Is it worth a try to recompile perl with multi-threading disabled? To be honest, I don't know if DBD::mysql failing this one test is even worth worrying about, but I'd still appreciate any advice anyone can offer. thanks, ken Try installing with CPAN As root do the following: perl -MCPAN -eshell cpan install DBD::mysql If this still fails the same test you should check that Mysql is running and that root can connect without a password. You should change that after installing. c
Re: DBI and DBD::MySQL (Panther)
To clear up any confusion for others that may pick up this thread, my previous email stated that a patch should not be made to perl sources... I mistook the details below as implying that each perl module (i.e. DBD::mysql) be patched for an error in the Config.pm module. In actuality, I believe, the patch is intended for the perl source itself... My bad. A demonstration of when to leave things up to those who know what they are talking about... C. On 10/15/03 6:28 PM, Edward Moy [EMAIL PROTECTED] wrote: In hints/darwin.sh, replace *) ld=MACOSX_DEPLOYMENT_TARGET=10.3 ${ld} ;; with *) ld=env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld} ;; Hopefully, this will go into 5.8.2. Ed On Oct 15, 2003, at 5:05 PM, David Wheeler wrote: On Wednesday, October 15, 2003, at 04:58 PM, Edward Moy wrote: We recently discovered the DBD::mysql problem as well. The patch is to edit /System/Library/Perl/5.8.1/darwin-thread-multi-2level/Config.pm, replacing: ld='MACOSX_DEPLOYMENT_TARGET=10.3 cc' with ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc' Unfortunately, this change is too late to get into Panther. Is there a patch that could go into the Perl sources themselves? Regards, David -- David Wheeler AIM: dwTheory [EMAIL PROTECTED] ICQ: 15726394 http://www.kineticode.com/ Yahoo!: dew7e Jabber: [EMAIL PROTECTED] Kineticode. Setting knowledge in motion.[sm]
Re: BBEdit-Perl confusion
On 10/16/03 5:12 PM, Ingles, Juan W. [EMAIL PROTECTED] wrote: I wonder: Is this because /opt/local/bin/perl points to the perl 5.6 binary or 5.6 binary path is hard coded in BBEdit Would this be in a plist file for BBedit? C. which perl on the terminal will tell you what binary you are launching ( not currently at my machine to check ) juan -Original Message- From: Vic Norton [mailto:[EMAIL PROTECTED] Sent: Thursday, October 16, 2003 2:46 PM To: [EMAIL PROTECTED] Subject: Re: BBEdit-Perl confusion I guess there is no fix right now. But actually the bug is somewhat convenient. Now a BBEdit script starting with #!/opt/local/bin/perl -w # Perl 5.8 uses Perl 5.8.0 with its @INC list if Run from BBEdit and uses Perl 5.6.0 with a different @INC list if Run in Terminal. It's not all bad---though it is a bit confusing. Regards, Vic At 12:03 PM -0400 10/16/03, Bare Bones Software Technical Support wrote: There is a bug in BBEdit where run in terminal hard codes the path to perl as /usr/bin/perl instead of taking the other usual steps to choose which interpreter to run. I have a bug logged and this will be corrected for the next release. At 9:56 AM -0400 10/16/03, Vic Norton wrote: I have recently installed Perl 5.8.0 on my iMac via PortsManager from DarwinPorts http://www.opendarwin.org/projects/darwinports/. Perl 5.8.0 resides in the /opt/local/bin directory, and this directory is at the beginning of $PATH. Everything works well except that BBEdit seems rather confused. Any suggestions as to how to rectify this confusion would be appreciated.
Re: BBEdit-Perl confusion
On 10/16/03 5:12 PM, Ingles, Juan W. [EMAIL PROTECTED] wrote: I wonder: Is this because /opt/local/bin/perl points to the perl 5.6 binary or 5.6 binary path is hard coded in BBEdit which perl on the terminal will tell you what binary you are launching ( not currently at my machine to check ) juan -Original Message- From: Vic Norton [mailto:[EMAIL PROTECTED] Sent: Thursday, October 16, 2003 2:46 PM To: [EMAIL PROTECTED] Subject: Re: BBEdit-Perl confusion I guess there is no fix right now. But actually the bug is somewhat convenient. Now a BBEdit script starting with #!/opt/local/bin/perl -w # Perl 5.8 uses Perl 5.8.0 with its @INC list if Run from BBEdit and uses Perl 5.6.0 with a different @INC list if Run in Terminal. It's not all bad---though it is a bit confusing. Regards, Vic At 12:03 PM -0400 10/16/03, Bare Bones Software Technical Support wrote: There is a bug in BBEdit where run in terminal hard codes the path to perl as /usr/bin/perl instead of taking the other usual steps to choose which interpreter to run. I have a bug logged and this will be corrected for the next release. At 9:56 AM -0400 10/16/03, Vic Norton wrote: I have recently installed Perl 5.8.0 on my iMac via PortsManager from DarwinPorts http://www.opendarwin.org/projects/darwinports/. Perl 5.8.0 resides in the /opt/local/bin directory, and this directory is at the beginning of $PATH. Everything works well except that BBEdit seems rather confused. Any suggestions as to how to rectify this confusion would be appreciated. I have now also found that running this command in Bbedit: print `which perl`; Produces the following error: MANPATH: Undefined variable. That is a very strange error to be produced by that command... I thought maybe it was a problem using the `` syntax to execute via the shell so I tried system() syntax, same results... I then thought maybe it was that bbedit choked on any system command but, print `echo test`; Worked fine... Very strange must have something to do with a hard coded environment in perl. C.
Re: DBI and DBD::MySQL (Panther)
Mike, I was encountering the same errors as you in my quest to install DBD::mysql and discovered that under the following setup: Custom installed Perl 5.8.1 RC3 - No multi-threading ggc 2.95 - via /usr/sbin/gcc_select 2 Removing /sw/lib/perl5/Storable.pm /sw/lib/perl5/auto/Storable I was able to compile and install Bundle::Msql which installs DBD::mysql. I cannot isolate wich of the above steps actually fixed the problem but I noted this difference in the make procedure: Running Mkbootstrap for DBD::mysql () chmod 644 mysql.bs rm -f ../blib/arch/auto/DBD/mysql/mysql.bundle LD_RUN_PATH=/usr/lib MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup -L/usr/local/lib dbdimp.o mysql.o -L/usr/local/mysql/lib -o ../blib/arch/auto/DBD/mysql/mysql.bundle -L/usr/local/mysql/lib -lmysqlclient -lm -lz chmod 755 ../blib/arch/auto/DBD/mysql/mysql.bundle cp mysql.bs ../blib/arch/auto/DBD/mysql/mysql.bs chmod 644 ../blib/arch/auto/DBD/mysql/mysql.bs Running Mkbootstrap for DBD::mysql () chmod 644 mysql.bs rm -f blib/arch/auto/DBD/mysql/mysql.bundle LD_RUN_PATH=/usr/lib /usr/local/bin/perl myld MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup -L/usr/local/lib dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.bundle -L/usr/local/lib -lz As you can see the first one carried on past the previous error point. I have a feeling that Bundle::Msql would successfully install under the default apple environment without switching gcc, without recompiling perl, and without removing Storable... I simply combined the methods of previous posts and hoped for the best. Later resorting to a memory of installing Bundle::Msql elsewhere. Someone should likely attempt to install Bundle::Msql under a clean OSX (Panther) install and report back on the outcome... cschilbe
Re: DBI and DBD::MySQL (Panther)
Edward, I edited /System/Library/Perl/5.8.1/darwin-thread-multi-2level/Config.pm, switched perl back to the apple install and had no problems building DBD::mysql. Your information is greatly appreciated! c On 10/15/03 5:58 PM, Edward Moy [EMAIL PROTECTED] wrote: We recently discovered the DBD::mysql problem as well. The patch is to edit /System/Library/Perl/5.8.1/darwin-thread-multi-2level/Config.pm, replacing: ld='MACOSX_DEPLOYMENT_TARGET=10.3 cc' with ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc' Unfortunately, this change is too late to get into Panther. --- Edward Moy Apple On Oct 15, 2003, at 1:52 PM, Conrad Schilbe wrote: I was encountering the same errors as you in my quest to install DBD::mysql and discovered that under the following setup: Custom installed Perl 5.8.1 RC3 - No multi-threading ggc 2.95 - via /usr/sbin/gcc_select 2 Removing /sw/lib/perl5/Storable.pm /sw/lib/perl5/auto/Storable I was able to compile and install Bundle::Msql which installs DBD::mysql. I cannot isolate wich of the above steps actually fixed the problem but I noted this difference in the make procedure: Running Mkbootstrap for DBD::mysql () chmod 644 mysql.bs rm -f ../blib/arch/auto/DBD/mysql/mysql.bundle LD_RUN_PATH=/usr/lib MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup -L/usr/local/lib dbdimp.o mysql.o -L/usr/local/mysql/lib -o ../blib/arch/auto/DBD/mysql/mysql.bundle -L/usr/local/mysql/lib -lmysqlclient -lm -lz chmod 755 ../blib/arch/auto/DBD/mysql/mysql.bundle cp mysql.bs ../blib/arch/auto/DBD/mysql/mysql.bs chmod 644 ../blib/arch/auto/DBD/mysql/mysql.bs Running Mkbootstrap for DBD::mysql () chmod 644 mysql.bs rm -f blib/arch/auto/DBD/mysql/mysql.bundle LD_RUN_PATH=/usr/lib /usr/local/bin/perl myld MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup -L/usr/local/lib dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.bundle -L/usr/local/lib -lz As you can see the first one carried on past the previous error point. I have a feeling that Bundle::Msql would successfully install under the default apple environment without switching gcc, without recompiling perl, and without removing Storable... I simply combined the methods of previous posts and hoped for the best. Later resorting to a memory of installing Bundle::Msql elsewhere. Someone should likely attempt to install Bundle::Msql under a clean OSX (Panther) install and report back on the outcome...
Re: DBI and DBD::MySQL (Panther)
I would think this should stay out of the perl sources since it is not a bug of perl's... Thoughts? I also just discovered that this fixes a build problem with Data::Dumper... Or so it would appear. It's possible this will effect several packages. The patch should not be put in all the perl sources should it? C On 10/15/03 6:28 PM, Edward Moy [EMAIL PROTECTED] wrote: In hints/darwin.sh, replace *) ld=MACOSX_DEPLOYMENT_TARGET=10.3 ${ld} ;; with *) ld=env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld} ;; Hopefully, this will go into 5.8.2. Ed On Oct 15, 2003, at 5:05 PM, David Wheeler wrote: On Wednesday, October 15, 2003, at 04:58 PM, Edward Moy wrote: We recently discovered the DBD::mysql problem as well. The patch is to edit /System/Library/Perl/5.8.1/darwin-thread-multi-2level/Config.pm, replacing: ld='MACOSX_DEPLOYMENT_TARGET=10.3 cc' with ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc' Unfortunately, this change is too late to get into Panther. Is there a patch that could go into the Perl sources themselves? Regards, David -- David Wheeler AIM: dwTheory [EMAIL PROTECTED] ICQ: 15726394 http://www.kineticode.com/ Yahoo!: dew7e Jabber: [EMAIL PROTECTED] Kineticode. Setting knowledge in motion.[sm]