Re: Parsing UTF8 files with wide characters
Try use utf8 - it lets Perl know that your script contains utf8 chars. More info: http://perlpod.com/5.9.1/lib/utf8.html Andrew On Jun 15, 2005, at 2:48 PM, Robin wrote: I thought I'd understood how to use unicode support in perl, but evidently not. In the script below, I'm stumped as to: 1) why the regex won't match ''. 2) why the substitution is carried out, but the result isn't in UTF8, nor is it UTF8 re-encoded in UTF8 (uncomment #require Encode; ... #Encode::decode_utf8($_); to test this ) TIA Robin #!/usr/bin/perl -w use strict; use diagnostics-verbose; #require Encode; binmode (DATA,:utf8); binmode (STDOUT,:utf8); for (DATA){ if (/([EMAIL PROTECTED])/gs){ print match: ,$1,\n; #Encode::decode_utf8($_); s/$1//gs; }elsif(/()/gs){ print match: ,$1,\n; s/$1/12/gs; } print; } __DATA__ !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; HTML HEAD META HTTP-EQUIV=content-type CONTENT=text/html; charset=utf-8 TITLE A Web Page/TITLE /HEAD BODY BLOCKQUOTE H3newsFONT COLOR=#FF33001/FONT/H3 ... and this is a web page. P IMG ALT=A Filler WIDTH=450 HEIGHT=296 P hidden marker here -FONT COLOR=#FF3300[EMAIL PROTECTED]/ FONT--BR /BLOCKQUOTE /BODY /HTML
Re: ModPerl on Tiger
On May 18, 2005, at 12:58 PM, Rich Morin wrote: Does anyone know whether (a) ModPerl is already part of Tiger? If not, how big a hassle is it to install? Specifically, is it something I could reasonably accomplish in an installation script? -r -- email: [EMAIL PROTECTED]; phone: +1 650-873-7841 http://www.cfcl.com- Canta Forda Computer Laboratory http://www.cfcl.com/Meta - The FreeBSD Browser, Meta Project, etc. I was happy to find that mod_perl is included in Tiger. Just uncomment the two relevant LoadModule and AddModule lines in /etc/ httpd/httpd.conf. Andrew
character encoding on file upload name
A few months ago, I thought I had finally figured out all there was to know about character encodings to prevent hosing output and getting wide char in print errors. However, I recently noticed that if I attempt to upload a file with non-ASCII characters in the name, I can't call a simple Encode::decode_utf8 to write this name into a file. The strange thing is that if I upload and save this file, it preserves the file name. If I write just the name to a file with binmode :bytes and then cat that file to terminal, it displays it correctly. However, if I open the :bytes file in BBEdit set to render utf-8 no BOM, the characters don't display correctly. If I write the filename to a file with binmode :utf8, I think I get double-encoding and nothing displays it correctly. If I use decode_utf8($filename, Encode::FB_CROAK) (or Encode::FB_WARN), then the utf8 flag on the string gets set and is_utf8 returns true. Otherwise it doesn't. So, it seems there are characters in the string that are causing decode_utf8 to return early. Regardless, the filename string is not valid utf-8. Other form fields will give me the expected utf-8 string when I call decode_utf8 (in warn/cat/terminal, http/filename output). So, I'm wondering what the difference could be... a CGI module issue? multipart/form-data POST issue? I've attached a web script example below that will hopefully come through okay for anyone who's interested. Try a filename with some non-ASCII characters and see what happens. Any insights would be appreciated. Thanks Andrew #!/usr/bin/perl use strict; use utf8; use Encode qw(is_utf8 decode_utf8); use CGI qw(:cgi uploadInfo); use IO::File; binmode(*STDOUT, :utf8); print Content-Type: text/html; charset=utf-8\n\n; print HTML; html head titletest/title /head body HTML if($ENV{REQUEST_METHOD} eq 'POST') { my $buf; my $rfh = upload('file'); my $f = param('file'); my $n = $f; $f = decode_utf8($f); ($f) = $f =~ m/([^\/\\]+)$/; my $fh = new IO::File; $fh-open(' test.txt'); binmode($fh, ':bytes'); # :utf8 ? print $fh $f, \n; # just write the filename into this file $fh-close; $fh-open( $f); # save the file itself with its original name binmode($fh, ':bytes'); while(read($rfh, $buf, 1024)) { print $fh $buf; } $fh-close; print 'file name = ', $f, ' / '; $f =~ s/./sprintf(0x%02x , ord($))/eg; # check char codes print $f, 'br /br /'; my $vals = uploadInfo(param('file')); for(keys %{$vals}) { print $_, ': ', decode_utf8($vals-{$_}), 'br /'; } print 'br /text field t1 = ', decode_utf8(param('t1')), 'br /'; print 'text field t2 = ', decode_utf8(param('t2')), 'br /'; } print HTML; br / form name=test method=post action=test.cgi enctype=multipart/form-data input type=text name=t1 value= s /br / input type=text name=t2 value=nth s /br / input type=file name=file /br /br / input type=submit / /form /body /html HTML
Re: character encoding on file upload name
On Apr 6, 2005, at 3:03 PM, John Delacour wrote: At 12:08 pm -0400 6/4/05, Andrew Mace wrote: Any insights would be appreciated. What happens if you comment out #use utf8; ... #binmode(*STDOUT, :utf8); ... #binmode($fh, ':bytes'); # :utf8 ? ... #binmode($fh, ':bytes'); It seems to work then as you want: http://cgi.bd8.com/cgi-bin/test050406.cgi JD Well, I get the same result as before - file itself saves okay, HTML page reports back okay, but when viewing in BBEdit (UTF-8, no BOM), the name of the file in test.txt doesn't render correctly - other form fields with extended charset data do, though. When I paste into Mail, though, it looks fine, so I have no idea what's going on. When I write the name to file with :utf8 and then try to read back in as :utf8 to send back to the browser, it gets totally hosed, that is: $filename = decode_utf8($filename); $fh-open(' test.txt'); binmode($fh, ':utf8'); print $fh $filename; $fh-close; $fh-open(' test.txt'); binmode($fh, ':utf8'); $filename = $fh; $fh-close; # HTML stuff print $filename, 'br /'; If the string's utf8 flag is enabled, perl won't try to reencode when I write to a :utf8 opened file, right? I just don't understand why this field is different from the other, non-file, form fields in multipart/form-data. Shouldn't I be using :utf8? If I don't always use that layer, things can easily get corrupted, right? Double encoding, and such as I reopen and append, etc.? And since I have UTF-8 characters in my script, I should use utf8; to let perl know and binmode(*STDOUT,':utf8') so that I'm not lying when I say Content-Type: text/html; charset=utf-8? Thanks Andrew
Re: stupid newbie question
Why not something like: my %sequences = (); my $seq; while() { if($_ =~ m/^Sequence ([^\n]+)$/) { $seq = $1; $sequences{$1} = [0,0]; } elsif($_ =~ m/CR05-C1-10(\d)/) { if($1 == 2) { $sequences{$seq}-[0]++; } elsif($1 == 3) { $sequences{$seq}-[1]++; } } } my $total_102 = 0; my $total_103 = 0; for(keys %sequences) { print $_, : 102 = , $sequences{$_}-[0], ; 103 = , $sequences{$_}-[1], \n; $total_102 += $sequences{$_}-[0]; $total_103 += $sequences{$_}-[1]; } print Total 102 = , $total_102, \n; print Total 103 = , $total_103, \n; Andrew On Jan 17, 2005, at 2:04 PM, Marco Takita wrote: Hi guys, sorry for the question not directly related to macosx but this is the OS I work with and I know that you guys are really helpful. I'm really new to perl. Actually I'm trying write my very first script. Let me try to explain what I need. I have a large text file that is basically something like this: Sequence Contig3772 Assembled_from CR05-C1-102-004-_A01_-CT.F_008.ab1 -40 955 Assembled_from CR05-C1-102-006-_E05_-CT.F_035.ab1 -40 972 Assembled_from CR05-C1-102-004-_B01_-CT.F_007.ab1 -32 1007 Assembled_from CR05-C1-103-033-_G08_-CT.F_026.ab1 397 1400 Assembled_from CR05-C1-102-060-_D07_-CT.F_029.ab1 403 1450 Assembled_from CR05-C1-102-008-_G03_-CT.F_010.ab1 404 1427 Assembled_from CR05-C1-102-065-_F12_-CT.F_043.ab1 406 1498 Sequence Contig3773 Assembled_from CR05-C1-103-041-_E11_-CT.F_044.ab1 -694 275 Assembled_from CR05-C1-102-019-_A11_-CT.F_048.ab1 -626 289 Assembled_from CR05-C1-102-019-_D03_-CT.F_013.ab1 -625 314 Assembled_from CR05-C1-102-019-_B11_-CT.F_047.ab1 -733 185 Sequence Contig3774 and so on. What I need is to count how many times either CR05-C1-102 or CR05-C1-103 appears in the text, which I was able to do: #!/usr/bin/perl while () { chomp; @text = (CR05-C1-102,CR05-C1-103); foreach $wd (split) { if ($wd =~ @text[0], @text[1]){ if ($wd =~ @text[0]){ $score++; } if ($wd =~ @text[1]){ $res++; } } } } print CR05-C1-102 $score CR05-C1-103 $res \n\n; My problem is that I cannot do that for individual blocks like: Sequence Contig3772 Assembled_from CR05-C1-102-004-_A01_-CT.F_008.ab1 -40 955 Assembled_from CR05-C1-102-006-_E05_-CT.F_035.ab1 -40 972 Assembled_from CR05-C1-102-004-_B01_-CT.F_007.ab1 -32 1007 Assembled_from CR05-C1-103-033-_G08_-CT.F_026.ab1 397 1400 Assembled_from CR05-C1-102-060-_D07_-CT.F_029.ab1 403 1450 Assembled_from CR05-C1-102-008-_G03_-CT.F_010.ab1 404 1427 Assembled_from CR05-C1-102-065-_F12_-CT.F_043.ab1 406 1498 I was not able to isolate this block from the rest of the text. Any idea how to do that? Thanks a lot Dr. Marco Aurélio Takita, Ph.D. Centro APTA Citros Sylvio Moreira Rodovia Anhanguera Km 158 Caixa Postal 04 13490-970 Cordeirópolis - SP, BRAZIL Tel.: 55-19-35461399
Re: Download images/movies
IE just displays the graphic but doesn't download it. The script does not seem to be overriding whatever the settings are in IE regarding MIME types and what to do with them -- I'm guessing. Is there a way to override that? You could try changing the Content-Type to application/download. The problem is Mac IE will show the save as prompt, but it will be the name of your script (download.pl) and not the filename you specified in the HTTP header. I haven't found any workaround for this. When I've done things like this in the past I've ended up using Apache conf settings like Chris' suggestion, though I'm realizing as I'm writing this that using $ENV{PATH_INFO} instead of the query string might solve that problem - take a look at the other Andy's suggestion for how to use that: a href=javascript:window.location='cgi-bin/download.cgi/Upload- Background.gif'picture link/a my $filename = $ENV{'PATH_INFO'}; Good luck Andy On Aug 24, 2004, at 6:17 PM, Andrew Mace wrote: $path is a system path, right? As in, like, not relative to the webserver? Just making sure... Also, I messed up and used $length in one place and $size in another, though that doesn't explain your troubles. I mean, you could do a lot of things to debug. A quick thing you could do would be to change the content type to image/jpeg and remove the Content-Disposition and see what gets put into your browser. Since you're writing the HTTP headers before attempting to open the file, my suspicion is that there's something wrong with the path to the file and your script is exiting prematurely. Andy On Aug 24, 2004, at 8:23 PM, Mark Wheeler wrote: Hi Andy, Thanks for the input. I should have check the read/write method -- my bad. I tried both the slurp and the read methods, but the same thing still happens. On a PC the save dialog comes up but the file saved is 0k, and on a Mac, the the progress bar is just a spinning barber poll. Any ideas? Thanks, Mark On Aug 24, 2004, at 3:56 PM, Andrew Mace wrote: Hey Mark - A few things. - You want to open the file for reading, not to write. - You should undef $/ to slurp the file if you're using to read. - You should stat the file before opening it to add the Content-Length header, if you want. - For larger files, it would make more sense to use read() calls instead of slurping the entire file into memory. So here's an updated version: #!/usr/bin/perl -w use strict; use CGI ':standard'; my $filename = param('picname'); my $path = /images/$filename; my $length = (stat($path))[7]; # the size, in bytes binmode STDOUT; print Content-Length: $size\n; print Content-Disposition: attachment;filename=$filename\n; print Content-Type: application/octet-stream\n\n; open (FILE, $path) || die(Can't open($filename): $!); binmode(FILE); # slurp method: undef $/; my $data = FILE; close (FILE); print $data; # read() method would be: while(read(FILE,$data,4096)) { print $data; } close(FILE); exit; Good luck Andy On Aug 24, 2004, at 6:19 PM, Mark Wheeler wrote: Hi all, Here is my first attempt to write this script. I will be adding the protection/whitelisting/etc. after I get the basic this running. Here is what I have so far, and here is what happens. On a PC, the dialog box comes up and saves the file, but it is 0K -- nothing in it. On a Mac, the Downloads dialog box comes up, but the progress bar keeps spinning and nothing happens. Below is the HTML that calls the script and the CGI script itself. What did I forget/do wrong? Thanks, Mark - html head titleUntitled Page/title /head body a href=javascript:window.location='cgi-bin/download.cgi? picname=Upload-Background.gif'picture link/a /body /html - #!/usr/bin/perl -w use strict; use CGI ':standard'; my $filename = param('picname'); my $path = /images/$filename; binmode STDOUT; print Content-Disposition: attachment;filename=$filename\n; print Content-Type: application/octet-stream\n\n; open (FILE, $path) || die(Can't open($filename): $!); my $data = FILE; close (FILE); print $data; exit; - On Aug 23, 2004, at 2:45 PM, Joel Rees wrote: I think that's what I'm looking for. One question. What do you mean whitelist the filepaths. My only reference point is email. Whitelist for me means that email address on my whitelist always get through, even though the spam software might initially think it's spam. Can you clarify? If the script I posted was readable, you might have noticed that it accepts one parameter and sets the directories only if that parameter matches correctly. It looks like a waste, but it's one way of what he was calling whitelisting in a fairly strict way, but allowing the same script to be used on multiple sets of images. You do have to add a little code for each set of images
Re: Download images/movies
Hey Mark - A few things. - You want to open the file for reading, not to write. - You should undef $/ to slurp the file if you're using to read. - You should stat the file before opening it to add the Content-Length header, if you want. - For larger files, it would make more sense to use read() calls instead of slurping the entire file into memory. So here's an updated version: #!/usr/bin/perl -w use strict; use CGI ':standard'; my $filename = param('picname'); my $path = /images/$filename; my $length = (stat($path))[7]; # the size, in bytes binmode STDOUT; print Content-Length: $size\n; print Content-Disposition: attachment;filename=$filename\n; print Content-Type: application/octet-stream\n\n; open (FILE, $path) || die(Can't open($filename): $!); binmode(FILE); # slurp method: undef $/; my $data = FILE; close (FILE); print $data; # read() method would be: while(read(FILE,$data,4096)) { print $data; } close(FILE); exit; Good luck Andy On Aug 24, 2004, at 6:19 PM, Mark Wheeler wrote: Hi all, Here is my first attempt to write this script. I will be adding the protection/whitelisting/etc. after I get the basic this running. Here is what I have so far, and here is what happens. On a PC, the dialog box comes up and saves the file, but it is 0K -- nothing in it. On a Mac, the Downloads dialog box comes up, but the progress bar keeps spinning and nothing happens. Below is the HTML that calls the script and the CGI script itself. What did I forget/do wrong? Thanks, Mark - html head titleUntitled Page/title /head body a href=javascript:window.location='cgi-bin/download.cgi?picname=Upload- Background.gif'picture link/a /body /html - #!/usr/bin/perl -w use strict; use CGI ':standard'; my $filename = param('picname'); my $path = /images/$filename; binmode STDOUT; print Content-Disposition: attachment;filename=$filename\n; print Content-Type: application/octet-stream\n\n; open (FILE, $path) || die(Can't open($filename): $!); my $data = FILE; close (FILE); print $data; exit; - On Aug 23, 2004, at 2:45 PM, Joel Rees wrote: I think that's what I'm looking for. One question. What do you mean whitelist the filepaths. My only reference point is email. Whitelist for me means that email address on my whitelist always get through, even though the spam software might initially think it's spam. Can you clarify? If the script I posted was readable, you might have noticed that it accepts one parameter and sets the directories only if that parameter matches correctly. It looks like a waste, but it's one way of what he was calling whitelisting in a fairly strict way, but allowing the same script to be used on multiple sets of images. You do have to add a little code for each set of images, of course. That script needs some comments. -- Joel Rees Getting involved in the neighbor's family squabbles is dangerous. But if the abusive partner has a habit of shooting through his/her roof, the guy who lives upstairs is in a bit of a catch-22.
Re: Download images/movies
$path is a system path, right? As in, like, not relative to the webserver? Just making sure... Also, I messed up and used $length in one place and $size in another, though that doesn't explain your troubles. I mean, you could do a lot of things to debug. A quick thing you could do would be to change the content type to image/jpeg and remove the Content-Disposition and see what gets put into your browser. Since you're writing the HTTP headers before attempting to open the file, my suspicion is that there's something wrong with the path to the file and your script is exiting prematurely. Andy On Aug 24, 2004, at 8:23 PM, Mark Wheeler wrote: Hi Andy, Thanks for the input. I should have check the read/write method -- my bad. I tried both the slurp and the read methods, but the same thing still happens. On a PC the save dialog comes up but the file saved is 0k, and on a Mac, the the progress bar is just a spinning barber poll. Any ideas? Thanks, Mark On Aug 24, 2004, at 3:56 PM, Andrew Mace wrote: Hey Mark - A few things. - You want to open the file for reading, not to write. - You should undef $/ to slurp the file if you're using to read. - You should stat the file before opening it to add the Content-Length header, if you want. - For larger files, it would make more sense to use read() calls instead of slurping the entire file into memory. So here's an updated version: #!/usr/bin/perl -w use strict; use CGI ':standard'; my $filename = param('picname'); my $path = /images/$filename; my $length = (stat($path))[7]; # the size, in bytes binmode STDOUT; print Content-Length: $size\n; print Content-Disposition: attachment;filename=$filename\n; print Content-Type: application/octet-stream\n\n; open (FILE, $path) || die(Can't open($filename): $!); binmode(FILE); # slurp method: undef $/; my $data = FILE; close (FILE); print $data; # read() method would be: while(read(FILE,$data,4096)) { print $data; } close(FILE); exit; Good luck Andy On Aug 24, 2004, at 6:19 PM, Mark Wheeler wrote: Hi all, Here is my first attempt to write this script. I will be adding the protection/whitelisting/etc. after I get the basic this running. Here is what I have so far, and here is what happens. On a PC, the dialog box comes up and saves the file, but it is 0K -- nothing in it. On a Mac, the Downloads dialog box comes up, but the progress bar keeps spinning and nothing happens. Below is the HTML that calls the script and the CGI script itself. What did I forget/do wrong? Thanks, Mark - html head titleUntitled Page/title /head body a href=javascript:window.location='cgi-bin/download.cgi? picname=Upload-Background.gif'picture link/a /body /html - #!/usr/bin/perl -w use strict; use CGI ':standard'; my $filename = param('picname'); my $path = /images/$filename; binmode STDOUT; print Content-Disposition: attachment;filename=$filename\n; print Content-Type: application/octet-stream\n\n; open (FILE, $path) || die(Can't open($filename): $!); my $data = FILE; close (FILE); print $data; exit; - On Aug 23, 2004, at 2:45 PM, Joel Rees wrote: I think that's what I'm looking for. One question. What do you mean whitelist the filepaths. My only reference point is email. Whitelist for me means that email address on my whitelist always get through, even though the spam software might initially think it's spam. Can you clarify? If the script I posted was readable, you might have noticed that it accepts one parameter and sets the directories only if that parameter matches correctly. It looks like a waste, but it's one way of what he was calling whitelisting in a fairly strict way, but allowing the same script to be used on multiple sets of images. You do have to add a little code for each set of images, of course. That script needs some comments. -- Joel Rees Getting involved in the neighbor's family squabbles is dangerous. But if the abusive partner has a habit of shooting through his/her roof, the guy who lives upstairs is in a bit of a catch-22.
Re: Converting PDF to JPEG
http://www.apple.com/applescript/imageevents/ Supported formats for reading are: PICT, Photoshop, BMP, QuickTime Image, GIF, JPEG, MacPaint, JPEG2, SGI, PSD, TGA, Text, PDF, PNG, and TIFF. Supported formats for _saving_ are: JPEG2, TIFF, JPEG, PICT, BMP, PSD, PNG, and QuickTime Image. Andrew On May 17, 2004, at 1:54 PM, Jerry LeVan wrote: Hmmm, what am I doing wrong... [macjerry:~/Desktop]$ sips -s format pdf FixedColor.jpg --out FixedColor.pdf /Users/jerry/Desktop/FixedColor.jpg Error: Not a valid format value /Users/jerry/Desktop/FixedColor.pdf [macjerry:~/Desktop]$ sips -s format pdf FixedColor.jpg --out FixedColor.pdf /Users/jerry/Desktop/FixedColor.jpg Error: Not a valid format value /Users/jerry/Desktop/FixedColor.pdf On May 17, 2004, at 10:34 AM, Daniel Staal wrote: --As of Saturday, May 15, 2004 8:35 AM -0700, Rich Morin is alleged to have said: I suspect that there are Cocoa frameworks that would let me import PDF and export JPEG, but I'd rather not go that way if I can help it. Question: What's the simplest way to solve this (ie, mechanically convert PDF files to JPEG (or GIF or ...) format? --As for the rest, it is mine. If you are using Panther, you can use Apple's 'sips' commandline program to do this. It is seriously under-documented, but it works well. (Though it doesn't handle transparencies. Not a problem if you are converting to JPEG, which doesn't support them.) I've successfully used this line in a Perl script to convert images: `sips -s format $ext $imagefile --out $imagedir 21` where $ext is the extension of the file type you want to convert to, $imagefile is the name of the file to be converted, and $imagedir is the directory or output image name. The only documentation available is from the commandline: type 'sips -h' for usage help and 'sips -H' for lists of properties that are supported. Daniel T. Staal (Note: if anyone wants to help *me* use the Cocoa frameworks to do this, I would be grateful. I need to be able to convert tiff/jpeg/gif/pdf/pict/png to a common file format (png or gif), preserving transparency and color balance. So far I've not had luck on Mac. I think I could convert pure Cocoa code to Perl...) --- This email copyright the author. Unless otherwise noted, you are expressly allowed to retransmit, quote, or otherwise use the contents for non-commercial purposes. This copyright will expire 5 years after the author's death, or in 30 years, whichever is longer, unless such a period is in excess of local copyright law. ---
XML::Sablotron and Panther
Hi I did a clean install of Panther last night and have been rebuilding my Perl libraries. Both libexpat and libsablot compiled ok, but when I try to install the XML::Sablotron package, I get the following errors: In file included from Sablotron.xs:89: Processor/Processor.h: In function `SchemeHandlerGetAllStub': Processor/Processor.h:286: warning: passing arg 3 of `Perl_sv_2pv_flags' from incompatible pointer type Processor/Processor.h: In function `SchemeHandlerGetStub': Processor/Processor.h:410: warning: passing arg 3 of `Perl_sv_2pv_flags' from incompatible pointer type DOM/DOM.xsh: In function `XS_XML__Sablotron__DOM__Node_xql_ns': DOM/DOM.xsh:643: warning: passing arg 3 of `Perl_sv_2pv_flags' from incompatible pointer type DOM/DOM.xsh:644: warning: passing arg 3 of `Perl_sv_2pv_flags' from incompatible pointer type When I restart Apache (I use PerlModule to preload XML::Sablotron), it dies with the following message: dyld: /usr/sbin/httpd Undefined symbols: __ZTVN10__cxxabiv117__class_type_infoE __ZTVN10__cxxabiv120__si_class_type_infoE __ZTVN10__cxxabiv121__vmi_class_type_infoE ___cxa_pure_virtual ___gxx_personality_v0 I noticed suggestions here: http://maclux-rz.uibk.ac.at/~maillists/sablotron/msg03799.shtml and here: http://www.mail-archive.com/[EMAIL PROTECTED]/msg05579.html among other places regarding 10.2, but they haven't fixed the problem. Again, this is a clean install of Panther -- the only system setting I've changed so far is adding /usr/local/bin to $PATH. Is this an issue with Apple's Perl 5.8.1 install, a compiler issue, a Sablotron issue, ...? Any insights would be appreciated. Thanks in advance Andrew
XML::Sablotron and Panther
Hi I did a clean install of Panther last night and have been rebuilding my Perl libraries. Both libexpat and libsablot compiled ok, but when I try to install the XML::Sablotron package, I get the following errors: In file included from Sablotron.xs:89: Processor/Processor.h: In function `SchemeHandlerGetAllStub': Processor/Processor.h:286: warning: passing arg 3 of `Perl_sv_2pv_flags' from incompatible pointer type Processor/Processor.h: In function `SchemeHandlerGetStub': Processor/Processor.h:410: warning: passing arg 3 of `Perl_sv_2pv_flags' from incompatible pointer type DOM/DOM.xsh: In function `XS_XML__Sablotron__DOM__Node_xql_ns': DOM/DOM.xsh:643: warning: passing arg 3 of `Perl_sv_2pv_flags' from incompatible pointer type DOM/DOM.xsh:644: warning: passing arg 3 of `Perl_sv_2pv_flags' from incompatible pointer type When I restart Apache (I use PerlModule to preload XML::Sablotron), it dies with the following message: dyld: /usr/sbin/httpd Undefined symbols: __ZTVN10__cxxabiv117__class_type_infoE __ZTVN10__cxxabiv120__si_class_type_infoE __ZTVN10__cxxabiv121__vmi_class_type_infoE ___cxa_pure_virtual ___gxx_personality_v0 I noticed suggestions here: http://maclux-rz.uibk.ac.at/~maillists/sablotron/msg03799.shtml and here: http://www.mail-archive.com/[EMAIL PROTECTED]/msg05579.html among other places regarding 10.2, but they haven't fixed the problem. Again, this is a clean install of Panther -- the only system setting I've changed so far is adding /usr/local/bin to $PATH. Is this an issue with Apple's Perl 5.8.1 install, a compiler issue, a Sablotron issue, ...? Any insights would be appreciated. Thanks in advance Andrew