MacPerl-Digest Thursday, April 8 1999 Volume 01 : Number 037 [MacPerl] Redirecting STDERR Re: [MacPerl] sendmail.pl [MacPerl] mkpath problem [MacPerl] w3mir [MacPerl] ANNOUNCE: OpenScript 1.5.1 and MacPerl Re: [MacPerl] What are MacPerl's capabilities Re: [MacPerl] Redirecting STDERR Re: [MacPerl] sendmail.pl Re: [MacPerl] mkpath problem Re: [MacPerl] sendmail.pl Re: [MacPerl] What are MacPerl's capabilities ---------------------------------------------------------------------- Date: Wed, 07 Apr 1999 13:37:33 -0500 From: Robert Pollard <robpoll1@bellsouth.net> Subject: [MacPerl] Redirecting STDERR Hey guys, This command which is actually an example in a book doesn't work. I don't know much about MacPerl so I don't know what options I have. open(STDERR, '>Dev:Console:Messages'); I thought it should open a window and send all error messages to the new window. Now I can't get it to send the errors to the MacPerl window with the command: open(STDERR, '>Dev:Console:MacPerl'); Anyone have an idea??? TIA!!! Robert Pollard ===== Want to unsubscribe from this list? ===== Send mail with body "unsubscribe" to macperl-request@macperl.org ------------------------------ Date: Wed, 7 Apr 99 16:00:37 -0700 From: Brian McNett <webmaster@mycoinfo.com> Subject: Re: [MacPerl] sendmail.pl > Sorry, but I couldn't resist rewriting it using Mail::Sendmail. It's > shorter and will also give you clear error messages if needed, do Mime > quoted-printable encoding for you, etc... I LIKE this list. You send out some code, and it comes back IMPROVED! Nifty little sample there, Milivoj. - --Brian ===== Want to unsubscribe from this list? ===== Send mail with body "unsubscribe" to macperl-request@macperl.org ------------------------------ Date: Wed, 7 Apr 1999 17:58:38 -0500 From: "Muggli, Ricardo T. (CCC)" <rtmuggli@carlsoncraft.com> Subject: [MacPerl] mkpath problem Does anyone here know how to get mkpath to work correctly using MacPerl? When I do something like mkpath("test/anotherdir/bob", 0, 0777); I simply get a folder named test/anotherdir/bob instead of the folder test with another folder in it with a bob folder in that. If I do mkpath("test:anotherdir:bob", 0, 0777); I get this error: # Deep recursion on subroutine "File::Path::mkpath".File '10:MacPerl:lib:File:Path.pm'; Line 132Out of memory!Out of memory!Out of memory! I'm doing this in part to get make_metrics from Font::AFM to work. Do I have to replace the / in any path with : inside of the AFM.pm? If I do that I'l also have to change the regex parts that truncate the / etc. thanks, Ricardo ===== Want to unsubscribe from this list? ===== Send mail with body "unsubscribe" to macperl-request@macperl.org ------------------------------ Date: Thu, 8 Apr 1999 00:57:49 +0200 From: Leif Halvard Silli <lhsilli@online.no> Subject: [MacPerl] w3mir Hello, I want to be able to use the mirror program "W3MIR" which can be found at <http://www.math.uio.no/~janl/w3mir/> Has anyone on this list made a succesfull installation of w3mir ? The followin shall of course demonstrate my complete lack of knowledge about Perl. But I still post it to find out whether I have to learn a lot before coping with w3mir, or if this will teach me the basics..... I tried to follow the installation instructions on the w3mir page. I just clicked on the make file.pl files in each module I had to install and ran the make file.pl One problem I had was with the libwww-perl-5.41. After runnin 'makefile.PL' MacPerl reported that >Checking for URI........... failed ># Can't locate URI.pm in @INC. >File 'ljovuskahd:Desktop >Folder:Mirrorprogram:libwww-perl-5.41:Makefile.PL'; Line 32 > >The URI module must be installed. WWW without URIs would not >be that great :-) Then i tried to install the URI module version 1.0.1 and 1.0.2 and then tried to install the libwww again, only to get the same result. Why ? Installation of MIME-Base64-2.11 went fine. After this, without the URI, I tried to install w3mir. Having run the makefile.PL MacPerl reported : >Checking if your kit is complete... Looks good Then comes the one million $ question: suppose everything above is ok, what do I do now ? I tried tio click on the "w3mir.PL"-file, but the I got the answer that the file was to big and tried to save it as a droplet getting this result: ># Can't locate w3http.pm in @INC. >File 'ljovuskahd:Desktop Folder:Mirrorprogram:w3mir.PL'; Line 198 ># BEGIN failed--compilation aborted. >File 'ljovuskahd:Desktop Folder:Mirrorprogram:w3mir.PL'; Line 198 Saving as runtime gave failure in Line 5 instead. When I opened the file in Alpha, I found nothing meaningful in Line 198, since it was a comment and should therefore not affect w3mir ? But perhaps 'Line' has a more specific meaning than I think here ? A simple xplanation would be welcome... Leif ===== Want to unsubscribe from this list? ===== Send mail with body "unsubscribe" to macperl-request@macperl.org ------------------------------ Date: Thu, 8 Apr 1999 01:16:16 +0200 From: Marco Bambini <marco@spiderlink.it> Subject: [MacPerl] ANNOUNCE: OpenScript 1.5.1 and MacPerl - --============_-1288595496==_ma============ Content-Type: text/plain; charset="us-ascii" What is OpenScript? OpenScript is a plugin for every HTTP server compatible with W*API 1.1 (like WebSTAR, Quid Pro Quo, AppleShare IP or WebTen). It allows you to include AppleScript, PERL and Frontier commands in your HTML pages; you can also write nested commands so you can use Frontier commands inside AppleScript scripts or AppleScript commands in Frontier scripts (also with PERL). How can I use it? Just write the scripts inside the <Applescript>...</Applescript> or <Usertalk>...</Usertalk> TAGs, OpenScript execute them and place the result in your HTML page. You can also write nested TAGs in order to use the best commands of both the scripting languages. OpenScript allows you to create powerful dynamic pages with AppleScript, MacPERL and Frontier!! This version offers an updated documentation in order to use MacPerl scripts inside your HTML page. For more information, or to download a free, fully-functional demo of OpenScript 1.5.1, visit http://www.geocities.com/SiliconValley/Network/7185 (software section). Thank you for your time, Marco Bambini Marco Bambini, http://www.geocities.com/SiliconValley/Network/7185/ ...writing software is like painting, dancing, singing .... - --============_-1288595496==_ma============ Content-Type: text/html; charset="us-ascii" <!doctype html public "-//W3C//DTD W3 HTML//EN"> <html><head><style type="text/css"><!-- blockquote, dl, ul, ol, li { margin-top: 0 ; margin-bottom: 0 } --></style><title>ANNOUNCE: OpenScript 1.5.1 and MacPerl</title></head><body> <div><b>What is OpenScript?</b></div> <div><br></div> <div><font color="#000000">OpenScript is a plugin for every HTTP server compatible with W*API 1.1 (like WebSTAR, Quid Pro Quo, AppleShare IP or WebTen).<br> It allows you to include AppleScript, PERL and Frontier commands in your HTML pages; you can also write nested commands so you can use Frontier commands inside AppleScript scripts or AppleScript commands in Frontier scripts (also with PERL).</font></div> <div><br></div> <div><b>How can I use it?</b></div> <div><br> Just write the scripts inside the <Applescript>...</Applescript> or <Usertalk>...</Usertalk> TAGs, OpenScript execute them and place the result in your HTML page. You can also write nested TAGs in order to use the best commands of both the scripting languages.</div> <div><br></div> <div><br></div> <div><b>OpenScript allows you to create powerful dynamic pages with AppleScript, MacPERL and Frontier!!</b></div> <div><br></div> <div><br></div> <div>This version offers an updated documentation in order to use MacPerl scripts inside your HTML page.</div> <div><br></div> <div>For more information, or to download a free, fully-functional demo of<br> OpenScript 1.5.1, visit http://www.geocities.com/SiliconValley/N<span ></span>etwork/7185 (software section).<br> <br> Thank you for your time,</div> <div><br></div> <div>Marco Bambini</div> <div><br> <x-tab> </x-tab>Marco Bambini,<br> <x-tab> </x-tab>http://www.geocities.com/SiliconValley/Ne<span ></span>twork/7185/<br> <br> <x-tab> </x-tab>...writing software is like painting, dancing, singing ....</div> </body> </html> - --============_-1288595496==_ma============-- ===== Want to unsubscribe from this list? ===== Send mail with body "unsubscribe" to macperl-request@macperl.org ------------------------------ Date: Wed, 7 Apr 1999 20:31:33 -0400 From: Chris Nandor <pudge@pobox.com> Subject: Re: [MacPerl] What are MacPerl's capabilities At 17.35 -0400 1999.04.07, Bart Lateur wrote: >On Wed, 07 Apr 1999 09:40:52 -0500, Robert Pollard wrote: >>I have looked at MacPerl and read the manual to a point. I am impressed >>so far but I have a couple of questions: >>1) How far can MacPerl go in allowing me to use the Mac Toolbox to do >>things like display a window with the ability to enter into fields any >>information I want and store it in a database of my own design? > >Sorry but I have to disagree with Chris on this one. Methinks that >MacPerl is a poor choice to build user-interfaces in. That stage is >still, huh, "under construction". Depends on what you are using it for. I use it regularly specifically for the purpose above: data entry into fields to save in a file. I even have a floating palette. I use it for my mp3tag program and my targzipme program, and I never have any problems at all. That is not to say it is easy to do, and not to say there aren't problems. But it works, and for the most part, works well in many areas. >Hmm... "front ends" is one thing I don't use Perl for. I'm not saying it >can't be done, but it definitely isn't amongst MacPerl's stronger >points. Yet. :-) > >Wel, just one guy's opinion. Certainly it can use work, both in stability and ease of use. But it is there, it is pretty powerful, and it works. The 5.2.0r4 release seems to have made it much more stable, too. - -- Chris Nandor mailto:pudge@pobox.com http://pudge.net/ %PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6']) ===== Want to unsubscribe from this list? ===== Send mail with body "unsubscribe" to macperl-request@macperl.org ------------------------------ Date: Wed, 7 Apr 1999 20:37:03 -0400 From: Chris Nandor <pudge@pobox.com> Subject: Re: [MacPerl] Redirecting STDERR At 14.37 -0400 1999.04.07, Robert Pollard wrote: >Hey guys, > >This command which is actually an example in a book doesn't work. I >don't know much about MacPerl so I don't know what options I have. > >open(STDERR, '>Dev:Console:Messages'); > >I thought it should open a window and send all error messages to the new >window. Now I can't get it to send the errors to the MacPerl window >with the command: > >open(STDERR, '>Dev:Console:MacPerl'); > >Anyone have an idea??? open(STDERR, '>Dev:Console:MacPerl'); warn "foo"; open(STDERR, '>Dev:Console:Messages'); warn "foo"; This opens one window and sends text to it, then another. If you want text to actually go the "real" MacPerl window, don't do anything, it goes there by default. - -- Chris Nandor mailto:pudge@pobox.com http://pudge.net/ %PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6']) ===== Want to unsubscribe from this list? ===== Send mail with body "unsubscribe" to macperl-request@macperl.org ------------------------------ Date: Thu, 08 Apr 1999 04:04:04 +0200 From: Fritz Haase <fritz.haase@metronet.de> Subject: Re: [MacPerl] sendmail.pl Brian McNett wrote: > > Sorry, but I couldn't resist rewriting it using Mail::Sendmail. It's > > shorter and will also give you clear error messages if needed, do Mime > > quoted-printable encoding for you, etc... > > I LIKE this list. You send out some code, and it comes back IMPROVED! > Nifty little sample there, Milivoj. > > --Brian > > ===== Want to unsubscribe from this list? > ===== Send mail with body "unsubscribe" to macperl-request@macperl.org ===== Want to unsubscribe from this list? ===== Send mail with body "unsubscribe" to macperl-request@macperl.org ------------------------------ Date: Wed, 7 Apr 1999 22:23:58 -0400 From: Chris Nandor <pudge@pobox.com> Subject: Re: [MacPerl] mkpath problem At 18.58 -0400 1999.04.07, Muggli, Ricardo T. (CCC) wrote: >Does anyone here know how to get mkpath to work correctly using MacPerl? >When I do something like >mkpath("test/anotherdir/bob", 0, 0777); >I simply get a folder named test/anotherdir/bob instead of the folder test >with another folder in it with a bob folder in that. As you should. / is not a path separator on Mac OS. >If I do >mkpath("test:anotherdir:bob", 0, 0777); >I get this error: ># Deep recursion on subroutine "File::Path::mkpath".File >'10:MacPerl:lib:File:Path.pm'; Line 132Out of memory!Out of memory!Out of >memory! Try ":test:anotherdir:bob" instead. In Mac OS, something that looks like "foo:" is a volume name, not a folder in the current directory. >I'm doing this in part to get make_metrics from Font::AFM to work. Do I have >to replace the / in any path with : inside of the AFM.pm? If I do that I'l >also have to change the regex parts that truncate the / etc. The Right Way to do portable paths in Perl these days is with File::Spec. use File::Spec::Functions; mkpath(catdir(curdir(), qw(test anotherdir bob)), 0, 0777) or die $!; As for identifying pieces of a path, File::Basename is usually the way to go. I don't know enough about what you are doing in Font::AFM to know. - -- Chris Nandor mailto:pudge@pobox.com http://pudge.net/ %PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10 1FF77F13 8180B6B6']) ===== Want to unsubscribe from this list? ===== Send mail with body "unsubscribe" to macperl-request@macperl.org ------------------------------ Date: Wed, 7 Apr 1999 22:58:19 -0500 From: Greenblatt & Seay <g-s@navix.net> Subject: Re: [MacPerl] sendmail.pl >Can someone send me a copy of sendmail.pl ? Check out http://www.sendmail.org/ ===== Want to unsubscribe from this list? ===== Send mail with body "unsubscribe" to macperl-request@macperl.org ------------------------------ Date: Thu, 8 Apr 1999 10:20:55 +0100 From: Chris Sansom <chris@highway57.co.uk> Subject: Re: [MacPerl] What are MacPerl's capabilities At 09:40 -0500 7/4/99, Robert Pollard wrote: >I have looked at MacPerl and read the manual to a point. I am impressed >so far but I have a couple of questions: >1) How far can MacPerl go in allowing me to use the Mac Toolbox to do >things like display a window with the ability to enter into fields any >information I want and store it in a database of my own design? >2) If so, does MacPerl hide the Mac Toolbox enough that I don't have to >be a C/C++ programmer to use it? >3) What resource is their for understanding the OO portion of MacPerl. > >I don't want to buy books and programming tools for MacPerl unless it >will meet my needs. Currently I work with 4th Dimension and Oracle. I >would like to have an alternative to 4D for developing front ends. I've read the various replies so far to this, and I feel I should perhaps throw in what on this list may seem a highly sacrilegious contribution! I'm hardly a world expert in MacPerl - I use it for developing CGI scripts that I later upload to a Unix server, so I don't have much use for or experience of the 'front end' side of it. From what I've seen of it, though, I would tend to agree with the folks who have said 'a bit easier than C/C++... but not much'. Now, here's the sacrilegious part: if you really want something that hides the toolbox and lets you build a front end in your sleep... <takes cover> try REALbasic! It's sort of a Mac equivalent of the dark side's Visual Basic only, from all I can tell, better and more consistent. It's still fairly new, and constantly under development - you can find out a certain amount about it (and download a demo) at http://www.realsoftware.com, though it's not the most informative of web sites. I know there was a plan for a REALbasic Pro with specialised database capabilities, but suspiciously there doesn't seem to be any mention of it on the site. BTW, they also seem to be involved in 4D development, so maybe Robert should check it out! (I don't have anything to do with Real software, BTW - just a copy of REALbasic on my hard disk waiting for me to get stuck into a major project whenever I can find the damn time!) Cheers ... Chris ====================================================================== Chris Sansom - Highway 57 - Designs for the World Wide Web | chris@highway57.co.uk http://www.highway57.co.uk | ====================================================================== ===== Want to unsubscribe from this list? ===== Send mail with body "unsubscribe" to macperl-request@macperl.org ------------------------------ End of MacPerl-Digest V1 #37 **************************** ==== Want to unsubscribe from this list? ==== Send mail with body "unsubscribe" to ==== macperl-digest-request@macperl.org