Re: BBEdit/Interarchy

2005-06-02 Thread Charles Albrecht
At 10:16 AM -0500 6/2/05, Bill Stephenson wrote:
>I've done that too, but it's a rather laborious solution to what must be a 
>rather common task and I'm thinking there could be a more automated way to 
>deal with it.

The approach I would tend to take would involve more infrastructure - setting 
up version control (say, subversion or cvs over ssh or tls) and do my save into 
the [remote] version control system. Then the task on the other end just 
involves sync'ing or exporting or updating with respect to the relatively local 
system. As others have noted, this doesn't get rid of the potential for race 
conditions, but it does allow you to work and upload your work without the 
sense that you're modifying the "live" version of the file out from under 
someone.

-Charles
 [EMAIL PROTECTED]


Re: Using Wireless Remote with Safari

2005-05-23 Thread Charles Albrecht
At 10:41 PM -0400 5/23/05, James E Keenan wrote:
>This is not, strictly speaking, a Perl question, but ...
>
>In order to do a conference presentation on an aspect of Perl next month, a 
>colleague and I have chosen to use an HTML-based slide show which we'll 
>present from an iBook or PowerBook.  We both customarily use Safari as our 
>default browser.
>
>I've done other presentations with Apple Keynote and have used a wireless 
>presentation remote (Kensington model 33062) to go forward and backward inside 
>Keynote.  I'd like to do the same with this HTML-slide show using Safari.
>
>My colleague knows enough Javascript to have successfully bound the 'n' and 
>'p' keys to the forward and backward motion of the Safari browser ... but I'd 
>like to be able to the same thing remotely, i.e., not have to touch the 
>keyboard to go to the next slide.
>
>Does anyone know how to bind the keys on this remote to actions in Safari?


Personally, I'd just use S5 (http://www.meyerweb.com/eric/tools/s5/) which has 
navigation bound to the forward and back arrow keys, unless you need something 
in your setup that S5 doesn't offer.

-C


Re: Safari Bookmarks comparison

2004-10-09 Thread Charles Albrecht
On Fri, Oct 08, 2004 at 03:20:22PM -0700, Mark Wheeler wrote:
>Hi,
>
>This might be slightly OT, but... I work in two different locations, 
>and have two different safari bookmark files, obviously. I was thinking 
>about writing a script that would log into one computer, d/l that 
>computer's safari bookmarks, compare that bookmark list to the one on 
>the current computer, make one file that includes all the bookmarks and 
>save that file to both computers. In short, keep the bookmark files 
>synced up.

What's wrong with:

  cvs update Library/Safari/Bookmarks.plist

followed by something like:

  cvs commit Library/Safari/Bookmarks.plist -m "`hostname` at `date`"

(or subversion's equivalent..)

-Charles
 [EMAIL PROTECTED]


Re: Icon in Address Bar

2004-04-25 Thread Charles Albrecht
At 10:18 PM -0400 4/25/2004, Sherm Pendley wrote:
>
>It's a file at the root of your site, called favicon.ico. It's a 16x16 icon in 
>Windows Icon (.ico) format, which is exportable from a number of graphics packages.


You can also indicate this file using a header along the lines of:
 



Re: The beloved "make" command & CPAN

2003-12-22 Thread Charles Albrecht
On Dec 22, 2003, at 6:11 AM, Sherm Pendley wrote:
On Dec 21, 2003, at 8:19 PM, Mark Lowe wrote:
With our without the Developer Tools CD, it still doesn't work.
The fact that modules won't install without developer tools is 
well-known, well-documented, and not in the least bit surprising if 
you think about it. After all, many modules include C code, and it's 
not really reasonable to expect them to install without a compiler and 
linker.
On 10.3, the Developer Tools CD is actually the XCode CD, isn't it?

-C



Re: File write/read problem

2003-09-24 Thread Charles Albrecht
>As you've said, it should create the file in the same directory, in
>this case the cgi-bin, as the script (which is called write.cgi). I run
>the call the script from the browser and the script runs fine, except,
>no file is created. I added a "|| die ($!)" at the file open call and
>add the CGI::CARP qw(fatalToBowser) at the top and get the following.
>
>Permission denied at /Library/WebServer/CGI-Executables/write.cgi
>
>All the permissions for each of these directories are 755. Something is
>a miss. So what can I do?! I'm very confused.

But owned by whom?

By default the directory is owned by root:admin. With apache running
as www:www it won't be able to write to that directory unless you
either change ownership or open the directory wide with 777.

-Charles Albrecht
 [EMAIL PROTECTED]




Re: CPAN newbie question - tries to download perl 5.8.0?

2003-03-07 Thread Charles Albrecht
At 1:26 PM -0500 3/7/2003, Jim Correia wrote:
>I've never used CPAN before - I've gotten by with the stock modules since I don't do 
>too much perl hacking. But now I've got a script from a third party that needs some 
>modules, so I figured I'd use CPAN to go get them.
>
>So I fired up the cpan shell, answered all the initial questions (with the default 
>answers). It suggested that I upgrade Bundle::libnet, so I took its advice and did 
>so. As I was watching what it was doing, it started downloading perl 5.8.0

The version of CPAN that Apple ships is buggy in this regard.

The first thing I recommend when first working with CPAN is:

cpan> install CPAN
cpan> reload cpan

(note: not Bundle::CPAN, which CPAN itself suggests as soon as it figures out that a 
newer version of CPAN is available)

CPANPLUS, which is intended to replace the CPAN module, is coming along nicely, but I 
remember having to revert to an earlier version recently because of some issues with 
either the stock perl from Apple or with my installation or both. CPAN's readme states:

This module will eventually be replaced by CPANPLUS. CPANPLUS is kind of
a modern rewrite from ground up with greater extensibility and more
features but no full compatibility. If you're new to CPAN.pm, you
probably should investigate if CPANPLUS is the better choice for you.

-Charles Albrecht
 euonymic.com


RE: macosx list?

2003-02-11 Thread Charles Albrecht
At 12:29 PM -0500 2/11/2003, Riccardo Perotti wrote:
>That Makes two of us. I would like to subscribe to that list as well.
>
>Thanks
>
>-Original Message-
>From: Riccardo Perotti [mailto:[EMAIL PROTECTED]]
>
>Sorry for the OT, but I've been looking for a MacOSX mailing list, like this
>one but not perl-only. Somewhere one could ask / discuss about apps, darwin,
>etc.
>
>Does anybody know where to find one?

Deja-vu...

There are some good lists hosted by Omnigroup.

  http://www.omnigroup.com/developer/mailinglists/

-C



Re: where to put things?

2003-01-16 Thread Charles Albrecht
At 1:07 AM -0800 1/16/2003, Rich Morin wrote:
>After quite a bit of poking around, I ran across pp. 38-41 of "Mac OS X
>for Unix Geeks" (Jepson & Rothman, O'Reilly), which gives some explicit
>information on setting up Startup scripts.  With this assistance, I was
>able to get my startup script going (whew!).

Note that the format of these scripts - specifically, how they are called - is 
different between 10.1 and 10.2. (With 10.1, they're merely called with 'start,' 
'stop,' or 'restart,' but stop and restart aren't implemented, and with 10.2, I 
believe they're called with 'StartService,' 'StopService,' or 'RestartService,' and 
the calling process provides a 'StartService' sub for the script to leverage.)

-Charles
 Euonymic solutions
 euonymic.com



Re: where to put things?

2003-01-15 Thread Charles Albrecht
At 9:01 AM + 1/15/2003, Paul Mison wrote:
>daemon: /Library/StartupItems/
>helper: in the Foo.app bundle
>
>Note that StartupItems are global, and for per-user items you'll need to figure out 
>how to use LoginItems instead, but it doesn't seem to have a folder in ~/Library/ on 
>my machine.

They are stored in the AutoLaunchedApplicationDictionary of 
~/Library/Preferences/loginwindow.plist as an array of aliases - at least on 10.2.

-Charles
 Euonymic Solutions



Re: Another Perl 5.8 Problem

2003-01-12 Thread Charles Albrecht
At 7:36 PM -0500 1/12/2003, Steve Linberg wrote:
>
>Thanks for your article, it was helpful to me when I was installing 5.8.0. 
>I've given up on 5.8.0 now, though, because of the trouble with mod_perl.
>
>Have you tried building Apache 1.3.27 with mod_perl 1.27 on your Perl
>5.8.0 setup?  I'd be really curious to see if it works.  My conclusion,
>after a weekend of suffering, is that it doesn't.  If you or anybody could
>show that it's possible and list build steps, I'd be very grateful indeed.
>
>Meanwhile I'm sticking to 5.6.0, flawed as it is, and installing modules
>by hand rather than via CPAN.pm in an effort to stay away from 5.8.0. :(

David Wheeler has put together a helpful set of instructions at

  http://david.wheeler.net/osx.html

These deal with installing 5.6.1 on 10.1, but should be helpful when taken together 
with Kevin's tutorial on Apple's site. At least until David updates the instructions 
to include 5.8 (and other things like the newer libapreq libraries). They involve 
compiling a static mod_perl into the apache binary and placing it (and Perl, if memory 
serves) outside of Apple's canonical locations.

As far as issues with CPAN are concerned, they should largely go away once you upgrade 
the version of CPAN that Apple ships (using 'install CPAN' rather than the suggested 
'install Bundle::CPAN' which invariable tries to download an entire Perl installation).

FWIW, CPANPLUS shows a great deal of promise.

-Charles
 Euonymic Solutions



Re: Fixing font spacing in Terminal.app

2003-01-08 Thread Charles Albrecht
At 8:28 PM -0500 1/8/2003, Erik Price wrote:
>On Wednesday, January 8, 2003, at 10:38  AM, Ken Williams wrote:
>
>>The Allegory of the Cave springs to mind. =)
>
>Is that an Empire Strikes Back reference?
>
>"Luke, the cave... remember your experience at the cave..." -- Yoda

Youngsters these days, >sigh<

-C



Re: Fixing font spacing in Terminal.app

2003-01-08 Thread Charles Albrecht
On 9:38 AM -0600 on 1/8/2003, Ken Williams wrote:
>Not much good anymore.  I'm now just another schmoe trying to figure out how I can 
>use iSync to save the world, and whether I want to switch from Omniweb to Safari.

Some nice features, but with a couple dozen shortcuts leveraging %@ in OmniWeb, I'd 
lose a fair amount of functionality with Safari. Still, the implication that other K 
apps might make it into the OS X userspace with polished interfaces is intriguing...

-C



Re: closing and opening a browser

2002-12-10 Thread Charles Albrecht
At 1:31 PM -0800 12/10/2002, Matt Morse wrote:
>>also i'm interesed in opening a browser with a valid internet address
>>as argument but i can't find out the syntax for mac os x - can anyone
>>give a hand with that?
>
>You can use the open command (see the man page for details):
>
>open -a Internet\ Explorer http://www.cnn.com
>
>or, if you don't want to specify a particular app:
>
>open http://www.cnn.com
>
>...and the site will appear in the user's preferred browser.

This is a 10.2 addition - the 10.1 version of open(1) didn't support URL access. And 
the first form appears to be irrelevant. If the file part of the command looks like a 
URL, the -a argument is ignored - it'll only pass the URL along to the default handler 
for that URL (in my case for http, OmniWeb) and leave the -a designated app unlaunched.

Switching around to different browser defaults, IE didn't seem to work properly the 
first time, but after quitting and relaunching, it worked acceptably well.

I wonder if issues with IE and /usr/bin/open were addressed in later Jaguar builds. 
With 10.2.2, it is working on my machine.

Just another set of data points.

-Charles
 Euonymic Solutions
 http://euonymic.com



Re: dynamic flash calendar

2002-12-03 Thread Charles Albrecht
At 10:25 AM -0500 12/3/2002, Doug Seib wrote:
>>good morning,
>>
>>I have a calendar that is powered by perl. The problem - works on a pc, not on a 
>mac. Basically, my mac can read the file, but not write to it. My PC reads and writes 
>no problem. My friend wrote the perl and we are pretty much without answers at this 
>point. If anyone has time to help/look at the .pl that would be great.
>>
>>You can test the calendar at http://debpasternak.com/newdeb/newseditor.html
>>
>>just click on edit calendar in the nav - the password is fred. I can send the .pl as 
>attachment if someone is willing to take a look at it.
>>
>>thanks,
>>
>>Doug


The problem was with the Flash, not with the Perl.

GET 
/newdeb/cgi-bin/schedule.pl%0A%0A%0A?newText=St%2E+Nicholas+Day&password=fred&currTime=64730&oldText=&id=dec6&done=

Returns a 404 - /newdeb/cgi-bin/schedule.pl%0A%0A%0A - does not exist. This much 
should be reflected in Apache's error logs.

You've since changed the password, so I gather you may have figured it out.

-Charles
 Euonymic Solutions
 http://euonymic.com



Re: OT praise for the cookbook

2002-11-27 Thread Charles Albrecht
At 1:31 PM -0500 11/27/2002, Dan Sugalski wrote:
>I don't think you want to wait that long. The cookbook for perl 6 would likely lag 
>behind perl 6's first major release by at least 18 months--it's tough to document 
>useful best practices for a language that's not out yet!

I think it'd also be useful to hold a second edition up next to a third edition and 
say "okay, here's how I would accomplish this in 5.8, and here's the Perl-6-ish was of 
accomplishing the same thing."

-Charles
 Euonymic Solutions
 http://euonymic.com



Re: unix or mac-style text files?

2002-11-25 Thread Charles Albrecht
On Monday, November 25, 2002, at 07:34  AM, Heather Madrone wrote:

Administrivia question:  I'm getting a lot of duplicate responsese
because the Reply-to on the list is set to sender.  On moderated
lists, this can be a good idea because the approval cycle causes
a lag between posting and mail reflection.

Is the Reply-to merely a hint that we should consider taking topics
offline, or is there some reason I should be leaving redundant addresses
in the headers?

More to the point, this list doesn't set Reply-To at all. There's a great 
deal of discussion at large about whether this is a good idea or not, but 
by-and-large, the From, To and Cc that come through are the same ones the 
Sender originally used.

At 12:21 PM +1100 11/25/2002, Ken Williams replied:

The extra copies are more for your convenience - I appreciate when people send them to 
me, because one copy goes to my list mailbox and the other goes to my inbox.  The one 
in my inbox will be read faster.

I wish there were a standard way to indicate in your own mail headers "I do/don't wish 
to receive a direct copy of replies to this message."  This can be done on usenet 
pretty effectively, but not really in email lists.

Well, on lists like this one that don't munge the Reply-To header, if you 
designate a Reply-To on the outgoing mail, it should remain intact all 
the way to the end recipients.

-Charles
 Euonymic Solutions
 [EMAIL PROTECTED]



Re: CamelBones packaging

2002-11-07 Thread Charles Albrecht
At 1:27 PM -0500 11/6/2002, Emmanuel. M. Decarie wrote:
>Hi Sherm,
>
>I think that your idea is brilliant.
>
>The thing that I'm not sure is what you are going to put under /Library/Camelbones.

One minor question I would have - would

  /Library/Application Support/CamelBones

be a better (in terms of fitting in with OS X's paradigms) location than

  /Library/CamelBones

?

-C



Re: Directory path error

2002-10-31 Thread Charles Albrecht
At 2:57 AM +1100 11/1/2002, Shannon Murdoch wrote:
>When specifying a directory to glob in MacOS X it malfunctions if the path
>contains a space ie. /Users/sydneyshan/University of Newcastle/*
>
>Is there any way around this without needing to replace the directory's
>spaces with underscores etc?

The standard ways are either quoting the entire string or escaping the spaces:

'/Users/sydneyshan/University of Newcastle/*'
 /Users/sydneyshan/University\ of\ Newcastle/*

When dragging from the Finder to Terminal, OS X uses the second approach.

-Charles
 Euonymic Solutions
 [EMAIL PROTECTED]



Re: LWP install

2002-10-30 Thread Charles Albrecht
At 10:50 AM +0100 10/30/2002, Tom Holland wrote:
>Please pardon my newbie foolishness
>
>Have a 10.2 Server system and am trying to install the LWP module via CPAN.
>
>This worked fine under a 10.1.5 system on a different machine (once I su'ed to root).
>
>(You get this message, because MakeMaker could not find 
>"/System/Library/Perl/darwin/CORE/perl.h")
>
>
>Does this mean Perl needs to be re-installed? Or is it merely a configuration problem?

Have you installed the Development tools on this system?

-Charles
 Euonymic Solutions
 [EMAIL PROTECTED]



Re: making files (and folders) (in)visible

2002-10-29 Thread Charles Albrecht
At 1:53 PM -0800 10/29/2002, Rich Morin wrote:
>I can't find a command-line method (let alone a Perl function)
>to change the "visibility" of files and folders.  Help?

/Developer/Tools/SetFile -a V foo

see the SetFile(1) manpage for details

There may be some tricks with getting the Finder to recognize the file really is 
invisible.

-Charles Albrecht
 Euonymic Solutions
 [EMAIL PROTECTED]



Re: [OT?] How to run scripts on OS X (reference needed)

2002-10-26 Thread Charles Albrecht
At 5:32 AM -0700 10/26/2002, Paul Goracke wrote:
>
>The number one problem encountered while going from MacPerl to OS X Perl is that your 
>MacPerl scripts will almost definitely use Mac linefeeds, while OS X Perl requires 
>Unix linefeeds. Change that using BBEdit or some other program (or even "perl -i.bak 
>-p -e 's/\r/\n/g' 

Re: OS X meltdown

2002-10-23 Thread Charles Albrecht
At 11:48 AM -0500 10/23/2002, Puneet Kishor wrote:
>if you do turn off the computer, then either remember to run psync before turning it 
>off, or figure out how to have it run automatically on shutdown.

Although SystemStarter, which processes and prioritizes the entries in OS X's 
StartupItems folders, is documented to allow 'stop' or 'restart' parameters in 
addition to 'start' to be sent to the StartupItems scripts themselves, this ability 
hasn't yet been activated. I had heard rumors that Jaguar would enable this, but read 
recently (on O'Reilly's macdevcenter.com) that it's still missing in 10.2.

Eventually "having it run automatically on shutdown" will be something we can 
accomplish on OS X.

-Charles
 Euonymic Solutions
 [EMAIL PROTECTED]



Re: question on ssh and peeve on editors

2002-10-04 Thread Charles Albrecht

At 9:42 PM -0500 10/3/2002, Puneet Kishor wrote:
>On Thursday, October 3, 2002, at 09:17  PM, Sherm Pendley wrote:
>>Why would you expect it to? Golive is a WYSIWYG HTML editor - the requirements for 
>which are a great deal different from those of a good Perl editor.
>
>so why does it offer support for coding php, asp, and other server side scripting 
>languages? the truth is that it is _primarily_ a wysiwig html editor... but if you 
>were to think of it as a web application development IDE... then it would make sense 
>to offer some basic scripting support (which it does, except not for perl), or a darn 
>good integration with a (or several) external editors.
>
>>[...]
>
>much of the time my html code itself is governed by some server-side logic... hence 
>perl (or any other scripting language) really becomes the generator of such code 
>(hence the existence of stuff like embperl and mason, etc.).

I think the crux of the issue is that, for the kind of support these wysiwyg editors 
provide and for the market they're targeting, plain-vanilla perl support doesn't make 
any sense at all. If they were to code for Perl, they would need to choose between any 
one of the Templating environments and support that - TT, Mason, embperl, etc. As far 
as I can tell, they are interested in documents that look like SGML and behave 
more-or-less similarly to HTML. And, in the intrinsic tmtowtdi nature of perl, there 
is no single canonical way to dress up an HTML document to include perl code.


-Charles
 Euonymic Solutions
 [EMAIL PROTECTED]




Re: question on ssh and peeve on editors

2002-10-04 Thread Charles Albrecht

At 9:03 PM -0500 10/3/2002, Puneet Kishor wrote:
>Thanks to everyone who answered. The bottomline is, I can't use ssh to transparently 
>mount a remote fs. I can fake it somewhat via RBrowser. Now I can peruse other 
>options such as nfs, webdav, or even smb.

You can also fake it pretty well with Interarchy.

-Charles
 Euonymic Solutions
 [EMAIL PROTECTED]



Re: question on ssh and peeve on editors

2002-10-03 Thread Charles Albrecht

At 2:32 PM -0400 10/3/2002, Chris Devers wrote:
>More broadly, the Finder can mount a variety of protocols, at least in
>Jaguar. Similar capability existed in 10.1 but it works better now. As
>Andrew says, just set the system focus to the Finder, hit cmd+K, then:
>
>   smb://windows/share/point
>   nfs://unix/share/point
>   afs://appletalk/share/point
>   ftp://ftpserver/path
>   webdav://webdav/path   <-- not positive about the protocol here

webdav is http://webdav/path

But of course, none of these are encrypted. I don't know about 10.2, but
in 10.1, the TLS-encrypted webdav sites I've put up can't be accessed from
the finder using https://

I use interarchy's "Edit in BBEdit" mode when I need local access to a
remote file over an encrypted connection, where saves are automatically
sync'ed up. I believe MacSFTP and a few other options also support this
mode. Interarchy also has a caching mode it calls an FTP disk (FTP or
FTP over SSH - the next version will add SFTP to the options). The
files you work with are local, but they look like they're on a mounted
volume.

-Charles Albrecht
 Euonymic Solutions
 [EMAIL PROTECTED]



Re: Cpantest

2002-10-01 Thread Charles Albrecht

At 12:53 PM +1000 10/2/2002, Ken Williams wrote:
>
>Here are the changes that I've made to http://testers.cpan.org/cpantest in order to 
>get it to work for me:
>
>==
>[...]
>+@MAIL_OPEN_ARGS = ('smtp', Server => 'ee.usyd.edu.au');
>[...]  
>==
>
>You'll have to change it to a different SMTP server, of course - which you could 
>easily control from an environment variable so you don't have to hard-code it in the 
>script.
>
>I haven't tried to get fixes for these problems incorporated upstream (or if I did, 
>it didn't happen), but it would be nice.

So it sounds like your problems were primarily with sendmail. Did you go through the 
normal steps for getting sendmail to work on OS X? (Permissions on / and /Users or 
setting a DontBlameSendmail flag, recompiling sendmail.cf)

-Charles
 Euonymic Solutions
 [EMAIL PROTECTED]



Re: dos2unix

2002-09-30 Thread Charles Albrecht

At 7:54 PM +0200 9/30/2002, Adriano Allora wrote:
>On the one hand I didn't express myself very well, but for the other hand I found 
>other aspects of the problem.
>
>Actual situation: I work with mac osx.2, vi editor, a pack of dos files to work on.
>When I open my files with vi I see some strings instead of stressed letters and signs.
>For instance:
>carriage return = ^M
>u grave = \xf9
>[...]
>so, I don't know I can face the problem: to create an array of strings to substitute 
>is a non-sense, because of I haven't got two lists in one-to-one correspondence... 
>er, I suppose (I'm not sure).
>What's yous opinion about?

I had the suspicion at the onset that this was a more involved issue than the line 
feed...

% perl -pi -e "s/(\015\012|\012|\015)/\n/g"

problem.

The files were created using a character set that is different from the character set 
that vi is using. (My guess is that Terminal's using Mac-Roman, but other likely 
suspects are UTF-8 or ISO 8859-1.)

You should be able to translate between the character sets fairly easily using 
Encode::Byte, but you'll need 5.7.3 or later - it's now part of the 5.8.0 core. You 
could probably borrow from the source to create a version that doesn't need the UTF-8 
flag.

There's also Unicode::Map8, which looks like it can similarly be leveraged to meet 
your needs.

And of course, it's a moderately simple exercise to prepare a couple of hashes to map 
forward and backward between two character sets.

-Charles
 Euonymic Solutions
 [EMAIL PROTECTED]



Re: installing dbi.pm on perl 5.6.0

2002-09-24 Thread Charles Albrecht

Among other things, they include the header files needed to compile XS 
code for Perl modules. It may be possible to install pre-compiled modules 
using from other sources, but you won't be able to compile them yourself 
without the Developer Tools.

-Charles
 [EMAIL PROTECTED]

On Mon, Sep 23, 2002 at 04:29:36PM -0500, Marijka Hambrecht wrote:
>No, I haven't installed the developer tools.  I haven't been able to 
>figure out what I would gain by installing them.  The documentation 
>included with the files seems very vague.
>
>>On Mon, Sep 23, 2002 at 02:20:29PM -0500, Marijka Hambrecht wrote:
>>>
>>>(You get this message, because MakeMaker could not find
>>>"/System/Library/Perl/darwin/CORE/perl.h")
>>
>>Have you installed the Developer Tools?



Re: DBD::Pg

2002-09-23 Thread Charles Albrecht

On Mon, Sep 23, 2002 at 12:59:19PM +0100, Vincent D Murphy wrote:
>
>i have omitted the remainder of the output, it just says that the other 
>tests are skipped.
>
>i presume this those symbols are the names of C functions, and that 
>this a problem with XS code somewhere.  but why the hell would a DBD 
>driver be interested in SSL?
>
>i am hoping somebody else has followed this road less travelled [0] [1] 
>with more success and can help me.
>
>0. http:[EMAIL PROTECTED]/index.html#03128
>1. http://david.wheeler.net/osx.html

I recompiled PostgreSQL without SSL (TLS) and then DBD::Pg compiled fine 
for me.

-Charles Albrecht
 [EMAIL PROTECTED]



Re: iCal parser in Perl

2002-09-17 Thread Charles Albrecht

At 12:37 AM -0500 9/17/2002, Puneet Kishor wrote:
>any move afoot to create an iCal .ics file parser in Perl to automagically create web 
>calendars? some folks seem to be working on a PHP version. Would be nice to have one 
>in Perl.

Since the .ics files are in the iCalendar (RFC2445 )format, Date::ICal would probably 
be a good place to start. You may find some discussion at reefknot - 
http://reefknot.org/ - and on the reefknot sourceforge lists.

-Charles
 [EMAIL PROTECTED]




Re: Storable.pm?

2002-09-10 Thread Charles Albrecht

At 7:38 AM -0400 9/10/2002, Chris Devers wrote:
>
>OSX pre-Jaguar came with the following in /usr/bin/cpan
>
>#!/usr/bin/perl
>
>eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}'
>if 0; # not running under some shell
>
>use CPAN;
>shell;
>
>Not sure why but it's not there anymore with 10.2.

Perhaps it didn't come on the pre-Jaguar systems either
and was installed while upgrading CPAN or installing
Bundle::CPAN.

-Charles
 [EMAIL PROTECTED]



Re: Opening file with application

2002-09-08 Thread Charles Albrecht

The docs - for open(1) in particular - might suggest something along the
lines of:

`open -a "Microsoft Excel" $foo`

(or whatever the Excel executable happens to be called on the target system)

But some versions of Excel (mine is ancient - YMMV with something newer
than v.4) might refuse to open files with an unfamiliar type.

-Charles
 [EMAIL PROTECTED]


At 2:20 PM -0700 9/8/2002, Ward W. Vuillemot wrote:
>Not that I have an answer...but I have a similar problem.  I can launch MS Excel and 
>have it open a OTF generated file from Win32.  But Mac OS X does not do itmaybe I 
>should read the docs, but...if I backtick an `open /dir/to/msexcel` Excel opens, but 
>the redirect, or `open /dir/to/msexcel < $file`` does not work.  That is to say, MS 
>Excel (Classic) still opens from within Perl on Mac OS X, but I cannot get it to open 
>the file itself...which is a pain in the butt. I figured if I got Mac OS X version MS 
>Office things might get rectified, but I have yet to get an upgrade.




Re: Installable packages

2002-09-05 Thread Charles Albrecht

At 12:12 PM +1000 9/6/2002, Ken Williams wrote:
>Yo,
>
>I notice that there's an application /Developer/Applications/PackageMaker.app that 
>can create installable OS X packages.  If people would find it useful, I could make a 
>couple of packages for installing perl and put them in my CPAN directory (and 
>probably the ports/ directory too?).  The following things could be useful:

If you set things up with PackageMaker, I highly recommend familiarizing
yourself with some of the problems with pax and the ways to get it to
play well with customized installations. See, for instance, the article: 
http://www.stepwise.com/Articles/Technical/Packages/BuildingAPackage.html
which is somewhat dated, but still useful.

I'll reserve my criticism of Apple's overzealous use of the "Overwrite
Permissions" flag for another time.

-Charles
 [EMAIL PROTECTED]



Re: DropScript recursive processing

2002-09-05 Thread Charles Albrecht

Er, @ARGV, that is.

-C

At 8:43 AM -0600 9/5/2002, Charles Albrecht wrote:
>More to the point,
>
>   %ARGV
>
>-Charles
> [EMAIL PROTECTED]
>
>
>At 1:42 PM + 9/5/2002, [EMAIL PROTECTED] wrote:
>>Well, you might call a script like this:
>>
>>  >perl foo.pl file1 file2 file3
>>
>>where each argument to the script (in this case 3 files) is passed in
>>to the script, separated by a space.
>>
>>If I created a DropScript out of my foo.pl, and dropped file1, file2,
>>and file3 onto it, it would be just like typing the command above.
>>
>>
>>Pete
>>
>>On Thu, 05 Sep 2002 20:37:20 +1000, "Shannon Murdoch"
>><[EMAIL PROTECTED]> said:
>>> Hi Pete,
>>>
>>> Unfortunately I'm not a command-line wiz <:(.  Could you explain how
>>> the
>>> target file/directory parameters are usually passed to the script when
>>> it IS
>>> called from the command line?
>>>
>>> Cheers,
>>> -Shannon
>>>
>>>
>>> On 5/9/02 2:59 AM, in article
>>> [EMAIL PROTECTED],
>>> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>>>
>>> > These are the notes I had on DropScript from April 23, 2002:
>>> >
>>> > In the old version of DropScript, it would run the script once for each
>>> > file dropped on it. Now it takes all of the files dropped on it, and
>>> > passes the list to DropScript, which is the way MacPerl droplets do it,
>>> > or the way the command line does it...
>>> >
>>> >   http://www.mit.edu/people/wsanchez/software/
>>> >
>>> > I'm thinking it should take whatever you drop on it (file or folder)
>>> > and pass it in just as if you called the script from the command
>>> > line...
>>>
>>>
>>
>>
>>
>>--
>>http://fastmail.fm/ - Consolidate POP email and Hotmail in one place





Re: DropScript recursive processing

2002-09-05 Thread Charles Albrecht

More to the point,

   %ARGV

-Charles
 [EMAIL PROTECTED]


At 1:42 PM + 9/5/2002, [EMAIL PROTECTED] wrote:
>Well, you might call a script like this:
>
>  >perl foo.pl file1 file2 file3
>
>where each argument to the script (in this case 3 files) is passed in
>to the script, separated by a space.
>
>If I created a DropScript out of my foo.pl, and dropped file1, file2,
>and file3 onto it, it would be just like typing the command above.
>
>
>Pete
>
>On Thu, 05 Sep 2002 20:37:20 +1000, "Shannon Murdoch"
><[EMAIL PROTECTED]> said:
>> Hi Pete,
>>
>> Unfortunately I'm not a command-line wiz <:(.  Could you explain how
>> the
>> target file/directory parameters are usually passed to the script when
>> it IS
>> called from the command line?
>>
>> Cheers,
>> -Shannon
>>
>>
>> On 5/9/02 2:59 AM, in article
>> [EMAIL PROTECTED],
>> "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>>
>> > These are the notes I had on DropScript from April 23, 2002:
>> >
>> > In the old version of DropScript, it would run the script once for each
>> > file dropped on it. Now it takes all of the files dropped on it, and
>> > passes the list to DropScript, which is the way MacPerl droplets do it,
>> > or the way the command line does it...
>> >
>> >   http://www.mit.edu/people/wsanchez/software/
>> >
>> > I'm thinking it should take whatever you drop on it (file or folder)
>> > and pass it in just as if you called the script from the command
>> > line...
>>
>>
>
>
>
>--
>http://fastmail.fm/ - Consolidate POP email and Hotmail in one place





RE: Launching a Perl file with Cron on OS X?

2002-08-08 Thread Charles Albrecht

I'd imagine the error you'd be receiving via email might be:

 root: Command not found.

You'll notice that it's attempting to execute the CMD

  "root open /Volumes/Builds/Development/perl.pl.command"

I'm not aware of an optional sixth field in the crontab format that
would designate "the user to run this command as" if there is
(the evidence of /etc/crontab notwithstanding).

The crontab that cron is running is the one that you installed using:

% crontab -e

It uses the format of crontab(5)

A) If you want this to run as root, you've got two options:

Install it into root's crontab using

% sudo crontab -e

B) Or into your own crontab with a listing of:

16 12 * * * sudo open /Volumes/Builds/Development/perl.pl.command

Of course, then, you'd need to special case /usr/bin/open in /etc/sudoers

C) Or, you could create a perl.sh.command with something (untested) like this:

!/bin/sh

sudo /Volumes/Builds/Development/perl.pl

(with /Volumes/Builds/Development/perl.pl special cased in /etc/sudoers)

And then use:

16 12 * * * open /Volumes/Builds/Development/perl.sh.command

in your own crontab.

D) But in general, I'd recommend, as others have, simply redirecting
output to a logfile that you can tail -f

% sudo crontab -e

16 12 * * * /Volumes/Builds/Development/perl.pl \
1>& /var/log/development.log \
2>& /var/log/development.err
# Or >> to append rather than replace

Then, you'd use

% tail -f /var/log/development.log

to watch its progress.

The benefit of this is that you're not chained to 'having the gui running'
as you would be if you were using open or some other technique that
forced a terminal to open.


Hope this helps,

-Charles
 [EMAIL PROTECTED]


At 12:37 PM -0700 8/8/2002, Noah Hoffman wrote:
>Hmm, still not working.  Here's what's in /var/log/system.log
>
>Aug  8 12:16:00 dhcp-192-168-66-178 CRON[4954]: (releaseb) CMD (root open 
>/Volumes/Builds/Development/perl.pl.command)
>Aug  8 12:16:00 dhcp-192-168-66-178 sendmail[4955]: g78JG0eG004955: SYSERR(releaseb): 
>collect: Cannot write ./dfg78JG0eG004955 (bfcommit, uid=25, gid=25): P$
>Aug  8 12:16:00 dhcp-192-168-66-178 sendmail[4955]: g78JG0eG004955: SYSERR(releaseb): 
>queueup: cannot create queue temp file ./tfg78JG0eG004955, uid=25: Per$
>Aug  8 12:16:00 dhcp-192-168-66-178 CRON[4953]: (releaseb) MAIL (mailed 29 bytes of 
>output but got status 0x0047 )
>Aug  8 12:17:52 dhcp-192-168-66-178 su: releaseb to root on /dev/ttyp1
>
>
>In crontab, I have [EMAIL PROTECTED] but I'm not getting email either.  
>Do you know what I'm missing?  I thought I was getting the 'cannot create temp file' 
>error because I wasn't root, but the crontab line is as follows:
>
>16  12  *  *  *  root open Volumes/Builds/Development/perl.pl.command
>
>Any thoughts?
>
>Thanks,
>Noah




Re: Locale errors with 5.6.1

2002-07-26 Thread Charles Albrecht

At 1:54 AM +0900 7/27/2002, [EMAIL PROTECTED] wrote:
> >maybe making an environment.plist
>>for root would be global. Anyone care to comment on that?
>
>
>. and the answer was no! damn!


You should be able to put it into /System/Library/UserTemplate to
apply to new users.

/usr/share/init/tcsh/ details the global defaults for csh-style shells
in /etc/csh.*  I'm not sure if Apple supports a global location
(/etc/profile) for sh-style shells.

Or, for that matter, a global environment.plist location (maybe somewhere
inside /Library).

I got around the issue by undef'ing d_setlocale in the darwin hints
file when I compiled 5.6.1.

-Charles
 [EMAIL PROTECTED]




Re: about .command and .term

2002-07-15 Thread Charles Albrecht

At 7:36 AM -0700 7/15/2002, Randal L. Schwartz wrote:
> >>>>> "Charles" == Charles Albrecht <[EMAIL PROTECTED]> writes:
>Charles> to have them appear on Terminal's submenu (for these - particular
>Charles> the ssh variety - I also tend to edit the CustomTitle parameter
>Charles> to keep them clear by their titles.
>
>Oooh.  S3kr3t Mag1c instructions!  Where is this documented?
>
>That's part of what frustrates me the most about OSX.  It's like
>OS9... people pass around folklore instead of being able to just say
>"man foo" as on "real unix" to read the whole story.

Especially when the included "Terminal Help," is so verbosely
helpful. The sum total of its help is:

  "The Terminal application lets you use a command-line interface
  and BSD utility programs."

My guess is that even though .term files are ordinary XML files,
someone at Apple thinks they are opaque black boxes. It's certainly
possible to edit all of these parameters within the GUI, but editing
the files directly is certainly easier in most cases. I just wish
it didn't involve so much "by inspection" work.

-Charles
 [EMAIL PROTECTED]



Re: about .command and .term

2002-07-14 Thread Charles Albrecht

At 3:36 PM -0700 7/12/2002, drieux wrote:
>which is mostly OK, since they appear to run with
>
>; exit
>
>but there are times when I would like to have
>something that runs as
>
>   
>
>without the 'auto' exit is there a way
>to do this with foo.term which seems to
>have a way to save a 'terminal session' ()

I use .term files by editing the ExecutionString value in
the XML to have...

ExecutionString
ssh foo.bar.baz; exit

behave as I want it to behave.

Furthermore, I toss frequently-used .terms into
   ~/Library/Application Support/Terminal

to have them appear on Terminal's submenu (for these - particular
the ssh variety - I also tend to edit the CustomTitle parameter
to keep them clear by their titles.

-C



Re: perl compile on mac os X

2002-07-08 Thread Charles Albrecht

At 5:39 PM -0400 7/8/2002, Geoffrey F. Green wrote:
>On 7/8/02 5:24 PM, "Chaos Golubitsky" <[EMAIL PROTECTED]> wrote:
>
>> Hello,
>>
>> I'm running mac os X (10.1.5), and am trying to install perl 5.6.1.
>> i downloaded and unpacked stable.tar.gz from perl.com.  There seem
>> to be no special instructions for mac os X at all in the distro,
>> so i thought i could just run Configure.
>
>Perl 5.6.1 was released before Mac OS X, so it doesn't account for OS X's
>quirks.  Thus, it is a bit cranky about installing on Mac OS X, but it can
>be done.  See:
>
>  http:[EMAIL PROTECTED]/msg00150.html
>  http:[EMAIL PROTECTED]/msg00895.html
>  http://duke.usask.ca/~dalglb/macosx/Perl_5.6.html
>
>The upcoming Perl 5.8.0 will build on Mac OS X without any problems.

You might also take a look at...

  http://david.wheeler.net/osx.html

which references the second item above.

(I think my results dealing with the locale issues "the right way" were
sporadic enough that I just added 'd_setlocale=undef;' to the end of
hints/darwin.sh and proceeded from there.)

-C
 [EMAIL PROTECTED]



Re: 10.1.5 upgrade hose CPAN installs?

2002-06-05 Thread Charles Albrecht

At 5:36 PM +0100 6/5/2002, Phil Dobbin wrote:
>I've recently installed a lot of modules via CPAN.pm into Library/Perl/ (basically 
>into directories like Bundle, DBD, Net, darwin) and I wondered if anybody here had 
>upgraded to 10.1.5 and, if so, does it hose any of the above direcories?
>
>CPAN does not install into System/Library/Perl/ because of the permissions issues so 
>I wondered what the new update did to the other standard Perl directories.

I haven't installed it yet, but looking through the .bom for the 
update, it doesn't touch any of the Perl directories. It does 
re-install PHP and some DAV stuff and so it includes the following 
for /usr/libexec/httpd/ 

httpd.exp
libphp4.so
libproxy.so
libssl.so
mod_access.so
mod_actions.so
mod_alias.so
mod_asis.so
mod_auth.so
mod_auth_anon.so
mod_auth_dbm.so
mod_autoindex.so
mod_cern_meta.so
mod_cgi.so
mod_digest.so
mod_dir.so
mod_env.so
mod_expires.so
mod_headers.so
mod_imap.so
mod_include.so
mod_info.so
mod_log_config.so
mod_mime.so
mod_mime_magic.so
mod_negotiation.so
mod_rewrite.so
mod_setenvif.so
mod_speling.so
mod_status.so
mod_unique_id.so
mod_userdir.so
mod_usertrack.so
mod_vhost_alias.so

And, of course, it installs a new version of sendmail. Those are the 
things that jumped out to me as potential conflict areas - nothing 
directly perlish, though.

-Charles
 [EMAIL PROTECTED]



Re: Error: Locating valid Perl during Module CPAN install

2002-05-21 Thread Charles Albrecht

You downloaded it from the developer connection site:

  http://connect.apple.com/

The "online" ADC membership level is free and allows CD images of 
the Developer tools to be downloaded. I'm still running the 
Dec 2001 version and haven't bothered yet to install the April 2002 
release (both are available online).

Details on the newer release are at:

  http://developer.apple.com/tools/macosxtools.html

-Charles
 [EMAIL PROTECTED]


At 11:42 AM -0700 5/21/2002, Mark S Lowe wrote:
>Where does one get that? From Apple's site? I looked for it last night and
>couldn't find it anywhere.
>
>On 5/21/02 9:20 AM, "Charles Albrecht" <[EMAIL PROTECTED]> wrote:
>
>> Have you installed the Developer tools?



Re: Error: Locating valid Perl during Module CPAN install

2002-05-21 Thread Charles Albrecht

At 9:42 PM -0700 5/20/2002, Mark S Lowe wrote:
>> (You get this message, because MakeMaker could not find
>> "/System/Library/Perl/darwin/CORE/perl.h")
>> Running make test
>>   Make had some problems, maybe interrupted? Won't test
>> Running make install
>>   Make had some problems, maybe interrupted? Won't install
>
>
>
>I have a standard 10.1.4 installation with a fresh OS X Perl installation.
>Meaning, no, I haven't messed up my default Perl installation yet. (smile)

Have you installed the Developer tools?

/System/Library/Perl/darwin/CORE/perl.h is part of the Developer tools 
instalation (the SDK part) and not part of the default install, so far 
as I can tell.

On my system, the bills of materials for Developer.pkg.prev (March '01) 
and for DevSDK.pkg (Dec '01) are the only ones that list that file.

-C



Re: OT: sendmail.cf - Never Mind!

2002-05-18 Thread Charles Albrecht

>> Hi All,
>> 
>> I stupidly deleted my /etc/mail/sendmail.cf file
>
>D'oh! I just found I had an Emacs buffer open with the file contents in it,
>even though the file was gone. No need to send me one, but I'm going to go
>hang my head in shame for a while.

In the future, you can always generate a clean copy with 
the files in /usr/share/sendmail/conf/

-Charles
 [EMAIL PROTECTED]



Re: Getting the path of a running process from OS X Perl

2002-05-13 Thread Charles Albrecht

At 3:13 PM -0700 5/12/2002, Randal L. Schwartz wrote:
>Charles> system q(/usr/bin/osascript -e 'tell application "Finder" to open 
>application file id "CWIE"');
>
>Maybe I don't quite understand AppleScript entirely yet,
>but isn't that the same as:
>
>  system "osascript", "-e", 'tell application file id "CWIE" to open';

I don't think so. I'm not that familiar with AppleScript myself. open 
may require an object "tell foo to open bar" - with Code Warrior, a 
project or source fild of some sort might be implied as the object. 
The same sort of thing that might be opened using the Open item from 
the application's file menu. 'activate' would do the trick.

However, the other bit is that 'application file' is something for 
the Finder to refer to the application. In a tell, I'm not sure what 
syntax you would use to refer to an app solely by its creator code. 
I thought 'id ""' by itself as in ...

  system "osascript", "-e", 'tell application id "CWIE" to activate';

 would do the trick, but it doesn't - at least not for me - so we're 
back to:

  system "osascript", "-e", 
'tell application "Finder" to open application file id "CWIE"';

With the Finder doing the heavy lifting.

-Charles
 [EMAIL PROTECTED]



Re: Getting the path of a running process from OS X Perl

2002-05-12 Thread Charles Albrecht

At 11:02 AM -0700 5/12/2002, Randal L. Schwartz wrote:
>>>>>> "Charles" == Charles Albrecht <[EMAIL PROTECTED]> writes:
>
>Charles> #!/usr/bin/perl -w 
>
>Charles> system q(/usr/bin/open -a "`/usr/bin/osascript -e 'tell application "Finder" 
>to get name of application file id "CWIE" ' `" );
>
>Gah.  That's about four levels too deep.  Maybe that was a joke.  If not,
>this is simpler:
>
>my $path = `osascript -e 'tell application "Finder" to get name of application file 
>id "CWIE"'`;

True. And then once you have the $path, you can call open -a later to 
launch it. Or just do:

system q(/usr/bin/osascript -e 'tell application "Finder" to open application file id 
"CWIE"');

And skip the later open call. It still doesn't trap for osa errors, but 
it's a place to start.

-Charles
 [EMAIL PROTECTED]



Re: Getting the path of a running process from OS X Perl

2002-05-02 Thread Charles Albrecht

At 1:08 PM -0600 5/1/2002, Charles Albrecht wrote:
>
>% open -a "BBEdit 6.5" file.txt
>
>will give you the desired effect. I don't know if it helps for 
>Arshad's original question, though, as you still don't know the 
>name of the app itself.


For that (Arshad's original question), you can leverage the Finder and 
OSA, something along the lines of...

#!/usr/bin/perl -w 

system q(/usr/bin/open -a "`/usr/bin/osascript -e 'tell application "Finder" to get 
name of application file id "CWIE" ' `" );

__END__


-Charles
 [EMAIL PROTECTED]



Re: Getting the path of a running process from OS X Perl

2002-05-01 Thread Charles Albrecht

At 11:33 AM +1000 4/29/2002, Ken Williams wrote:
>Perhaps you don't need to.  Maybe you could just use the "open" 
>command in the shell (see "man open") to open it without a 
>path.  You can do things like this:
>
>   open -a com.barebones.bbedit file.txt
>
>That will find BBEdit, wherever it is, and launch it.
>
>A potential snafu is that it seems to require a file to open, 
>you can't just launch the application by itself.  Anyone know a 
>way around this?

In your example, com.barebones.bbedit is irrelevant. The reason 
it appears to work is that you very likely BBEdit set as the 
application used by default to open file.txt. This example is 
then the same as:

% open file.txt

Which is the same as double-clicking that file in the Finder. You 
need the actual name of the application. 

% open -a "BBEdit 6.5" file.txt

will give you the desired effect. I don't know if it helps for 
Arshad's original question, though, as you still don't know the 
name of the app itself.

-Charles
 [EMAIL PROTECTED]



Re: Help with Apache installation

2002-04-26 Thread Charles Albrecht

At 9:31 AM -0700 4/26/2002, David Wheeler wrote:
>On 4/26/02 8:39 AM, "Ward W. Vuillemot" <[EMAIL PROTECTED]> claimed:
>
>> I thought I would go back to installing everything.
>> Last time, when I installed Apache, I had had problems with the following
>> command:
>> 
>> SSL_BASE=/usr/local/src/openssl-0.9.6c/ \
>>   ./configure \
>>   --with-layout=Apache \
>>   --enable-module=ssl \
>>   --enable-module=rewrite \
>>   --enable-module=so \
>>   --activate-module=src/modules/perl/libperl.a \
>>   --disable-shared=perl \
>>   --without-execstrip
>> 
>> Telling me that SSL_BASE is not understood.
>> 
>> So I set it using
>> % Setenv SSL_BASE "/usr/local/src/openssl-0.9.6c/"
>> % ./configure \
>> [...]
>
>Both of these should work -- I don't get it. Try switching to zsh and doing
>it again:
>
>% zsh
>% SSL_BASE=/usr/local/src/openssl-0.9.6c/ \
>   ./configure \
>   --with-layout=Apache \
>   --enable-module=ssl \
>   --enable-module=rewrite \
>   --enable-module=so \
>   --activate-module=src/modules/perl/libperl.a \
>   --disable-shared=perl \
>   --without-execstrip
>
>etc.

If you prefer to use the default tcsh, this will work:

% env SSL_BASE=/usr/local/src/openssl-0.9.6c/ \
   ./configure \
   --with-layout=Apache \
   --enable-module=ssl \
   --enable-module=rewrite \
   --enable-module=so \
   --activate-module=src/modules/perl/libperl.a \
   --disable-shared=perl \
   --without-execstrip


Note that --with-layout=Apache will install in /usr/local as noted elsewhere 
in this thread. Leaving it off or using --with-layout=Darwin will install 
it over Apple's defaults.

-Charles Albrecht
 [EMAIL PROTECTED]



Re: a new topic: DBI stopped working/force install with CPAN

2002-04-16 Thread Charles Albrecht

At 11:56 AM -0500 4/16/2002, PK Eidesis wrote:
>working with my new one. Here's the problem... some of Apple's modules,
>specifically mod_hfs_apple.so, doesn't work anymore. Question: what does
>this module do? does it account for hfs case-sensitivity? Do I need it? If
>yes, where do I get one and how do I build it for my new Apache?

http://www.stepwise.com/Articles/Workbench/2002-04-05.02.html 

has information regarding mod_hfs_apple. (It's their "how I fixed what 
the April Security Update broke for me" page.) Specifically, they've 
got a copy of the source at:

http://graphics.stepwise.com/Articles/Workbench/mod_hfs_apple-2.1.tgz

with a Makefile modified from Apple's - I'm not sure where Apple's 
version of the source might be. 

Make sure it's set to install in the directory you want before doing 
make install.

-Charles
 [EMAIL PROTECTED]

-- 
Charles Albrecht  Euonymic Solutions
[EMAIL PROTECTED]   P.O. Box 300623
C>303.619.7596  F>978.334.3061   Denver, Colorado 80203-0623
http://www.euonymic.net/~charlesa/cv/



Re: mod_perl stopped working...

2002-04-11 Thread Charles Albrecht

At 11:55 AM -0700 4/11/2002, Alex S wrote:
>
>My real point is not a matter of technical savviness.  It's more that 
>something Apple pushed out broke something I, and others have setup.  I 
>might even have been more cautious about the update IF they listed it as 
>something being updated, which they did NOT do.  

Alex,

http://docs.info.apple.com/article.html?artnum=120111 lists only 
the security-related components in the update. If you are concerned 
about the complete contents of an update (and I would suggest that 
in any case where you are in the habit of replacing apple-supplied 
binaries you do), I recommend that you examine an exhaustive 
manifest before performing the install. If you can't find a site 
that publishes a manifest, then learn how to extract one for 
yourself using lsbom(8) or pax(1) or using a tool like pacifist.

In this case, Apple listed mod_ssl 2.8.7 (technically 2.8.7-1.3.23 as 
mod_ssl is always paired with specific apache versions) as the updated 
version. This implies that Apache would be updated to 1.3.23. From that, 
it stands to reason that a number - if not most - of the Apple-delivered 
DSOs would be recompiled as well and included in the install.

A good low-noise site for keeping track of these sort of updates 
and their implications is Stepwise. Their announcement on the update 
http://www.stepwise.com/Articles/News/2002-04-05.01.html includes 
Apache-specific information. They don't provide perl & mod_perl 
instructions on Stepwise, but if Apple changes something with Apache, 
they'll flag it and you can notice it there.

As others have noted, there is nothing new under the sun. These issues 
are common to all *nix packaging systems. Those who don't want Apple 
to break what they've installed should either install things in other 
locations (fink does this, from what I understand) or leave the Apple-
installed packages alone. 

It's a good lesson to learn. It's unfortunate that it's more frequently 
learned firsthand than through secondhand annectodal accounts.

-Charles
 [EMAIL PROTECTED]



Re: Bizarre expansion from the command line

2002-03-13 Thread Charles Albrecht

At 4:25 PM -0800 3/13/2002, Iago wrote:
>On Wed, 13 Mar 2002, Gary Blackburn wrote:
>
>> Anyone have any idea what's going on? The "!" isn't one of the 
>> metcharacters, and all this code works exactly as expected whenever you 
>> run it within an actual Perl file (i.e., not from a one-liner.) I tried 
>> this code on Linux and ActiveState Perl and everything works fine, which 
>> makes me think it's an OS X/Darwin thing. Thoughts? Thanks!
>
>  It's the shell that's doing it -- the ! operator is telling the shell
>  to (in short) do stuff... when you're escaping the !, you're escaping
>  it for the shell, not for perl.

Yeah, what Fred said.

The "stuff" it's doing is looking backwards through the history of 
commands entered on the command line and filling that in. Common 
examples are:

  !!for the previous command
  !-4   to go back four and execute that command
  !15   to use the 15th command (they're numbered when you call history)
  !vi   to go back to the most recently used command starting with 'vi'

So, for instance:

% clear; !!
% !-3 | less
% ls -ld `!find`
% bbedit "`!grep --files-with-matches`"

-Charles
 [EMAIL PROTECTED]



Re: Apache on a G4

2002-03-12 Thread Charles Albrecht

> 1)  I am wondering whether to use Linux-ppc or
>Mac OS X as the OS.
>
> I am hoping that someone, (or a few of you) with experience on these
>platforms,
> would let me know what you like or dislike about either.

Thomas,

The linux-ppc distributions are much closer to other linux distributions, 
especially as directory layouts are concerned. It would allow you to 
leverage substantial existing linux experience. 

For the most part, though, I prefer OS X, especially in situations 
where there's more experience with GUI-oriented OSes like the Classic 
Mac OS or Windows.

Some additional modules that require compiled code may be a little more 
complicated to compile on OS X, but as time progresses, patches will get 
back to the authors and incorporated into the build process.

> 2)  I have not seen anyting about mod_perl w/Apache on OS X, but I assume
>that since
>OS X is Unix based that it would work.  Is that correct?

Yep. As Kevin mentioned, his articles on O'Reilly Net are a great 
place to look into the flexibility of OS X's Apache setup.

  http://www.oreillynet.com/pub/ct/49

mod_perl is installed (but not enabled) by default.

> 3)  From the apple web site I saw the following comment --
>
>"Also, Perl 5.6 (the BSD Unix version) will be included with Mac OS X,
>eliminating
>the need to install a separate freeware package for Perl capabilities like
>MacPerl."
>
>Then on this newsgroup, I was reading about the excitement over the release
>of
>MacPerl 5.6.1.
>If the linux version of perl runs on OS X then why the buzz over the current
>release of MacPerl?

A number of Macs out there will remain pre-OS X indefinitely and many will 
never make the switch. 5.6.1 is a big jump from the previous release 
four years ago (based on Perl 5.004). The changes for MacPerl have also 
been incorporated into the primary Perl source, so it is likely that 
MacPerl 5.8 will compile directly from the Perl source when 5.8 is released. 

It is a significant technical achievement, and those involved have spent 
a lot of time digging into the Perl source to get it to work as cleanly 
as it does. 

One of the significant aspects of this is that it sets the stage for 
versions of the Mac:: modules to be rewritten in the Mac::Carbon:: 
namespace. That will mark a significant boost to the range of options 
available with perl on OS X.

-Charles
 [EMAIL PROTECTED]

-- 
Charles Albrecht  Euonymic Solutions
[EMAIL PROTECTED]   P.O. Box 300623
C>303.619.7596  F>978.334.3061   Denver, Colorado 80203-0623
http://www.euonymic.net/~charlesa/cv/



Re: SUCCESS: libapreq working in Mac OS X

2002-02-22 Thread Charles Albrecht

At 12:17 PM -0500 2/22/2002, Joe Schaefer wrote:
>Ged Haywood <[EMAIL PROTECTED]> writes:
>
>> Hi there,
>> 
>> On 22 Feb 2002, Joe Schaefer wrote:
>>
>> >   3) Install libapreq.so.1.0.0 (to /usr/local/lib) using:
>> > 
>> > % ./configure
>> > % make
>> > % make install
>> > 
>> >   4) Now install Apache::Request and Apache::Cookie using
>> > 
>> > % perl Makefile.PL
>> > % make
>> > % make install
>> 
>> Should that be
>> 
>> % make
>> % su
>> # make install
>
>Sure.

Or better yet,

% make
% sudo make install

-- 
Charles Albrecht  Euonymic Solutions
[EMAIL PROTECTED]   P.O. Box 300623
C>303.619.7596  F>978.334.3061   Denver, Colorado 80203-0623
http://www.euonymic.net/~charlesa/cv/



Re: Lastlog

2002-02-19 Thread Charles Albrecht

At 2:11 PM -0500 2/19/2002, Bill Jones wrote:
>So I did a
> touch /var/log/lastlog
>
>Now I get -
>Feb 19 14:04:13 sneex sshd[835]: lastlog_get_entry: Error reading from
>/var/log/lastlog: Device not configured
>
>Any ideas?

I did much the same on my systems. I've got it set root:wheel and 644. 
Could that be the issue for you? 

-Charles



Re: Sendmail Aliasing to a Perl Program

2002-02-10 Thread Charles Albrecht

At 8:38 PM -0700 2/10/2002, Justin Simoni wrote:
>I receive this message in the bounced email:
>
>smrsh: perl not available for sendmail programs
>
>So I went poking around to see if I could figure out how I can make smrsh to
>make perl available for sendmail, and got this from its man page:
>
>Briefly, smrsh limits programs  to  be  in  the  directory
>   /usr/adm/sm.bin,  allowing  the  system  administrator  to
>   choose the set of acceptable commands
>
>Which is super, but I cannot find /usr/adm/sm.bin in OSX. I can't find
>anything sm.bin. Has anyone figured out what should be done in this
>situation? 

If memory serves, I created the directory...

% sudo mkdir -p /usr/adm/sm.bin -m 755

 and then placed the link in it...

% sudo ln -s /path/to/script.pl /usr/adm/sm.bin/script.pl

 where the permissions on /path/to/script.pl are 755.

And then change /etc/mail/aliases to show:

scripttest: "|script.pl"

I believe that should work as long as /path/to/script.pl has a full 
shebang line. Then, you wouldn't need to explicitly add perl to sm.bin.

-Charles
 [EMAIL PROTECTED]
-- 
Charles Albrecht  Euonymic Solutions
[EMAIL PROTECTED]   P.O. Box 300623
C>303.619.7596  F>978.334.3061   Denver, Colorado 80203-0623
http://www.euonymic.net/~charlesa/cv/



Re: psync fails with 5.7.2

2002-02-05 Thread Charles Albrecht

At 9:42 AM +0900 2/6/2002, Dan Kogai wrote:
>   As for psetfinfo, yes,  pod needs some polishing.  Pod-linting is very 
>welcome (But I have to tell you, too that SetFile, which functionalities 
>psetfinfo based upon, doesn't even come with manpage!)

Dan, perhaps you mean GetFileInfo. 

SetFile's manpage is installed by default at /usr/share/man/man1/SetFile.1

-Charles
 [EMAIL PROTECTED]



Re: h2ph problems

2002-02-05 Thread Charles Albrecht

At 5:07 PM -0500 2/5/2002, Jonathan Baumgartner wrote:
>On 2/5/02 5:03 PM, "Randal L. Schwartz" <[EMAIL PROTECTED]> wrote:
>
>> It was a great idea for Perl3.  We're now about a decade past that. :)
>
>D'oh. Well, although I've programmed for Perl in the past, I've never done
>much installing. So much for manuals .. :)

Careful, there, Jon. I've got a whole shelf here of manuals that Randal 
wrote. (Granted, most of them are now obsolete, but still, there they are.)

-C

-- 
Charles Albrecht  Euonymic Solutions
[EMAIL PROTECTED]   P.O. Box 300623
C>303.619.7596  F>978.334.3061   Denver, Colorado 80203-0623
http://www.euonymic.net/~charlesa/cv/



Re: Walkthrough for the Perl compile problem?

2002-01-23 Thread Charles Albrecht

At 10:02 AM -0500 1/23/2002, Frank Nospam wrote:
>Also, Apple says that with their default Apache running,
> I should be able to use the default CGIs. However,
> http://localhost/printenv returns a 404 for me.
> What's going wrong?

I can't answer the other ones, but this one is fairly straightforward.

If you take a look at /var/log/httpd/error_log, it will show an error 
along the lines of: 

[client 127.0.0.1] File does not exist: /Library/WebServer/Documents/printenv

So, this isn't the correct place where printenv lives and it isn't 
the correct way to access it.

 % locate printenv

Shows that it's at:  /Library/WebServer/CGI-Executables/printenv 

The configuration file at /etc/httpd/httpd.conf includes this bit:


#[.. snip ..]
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
ScriptAlias /cgi-bin/ "/Library/WebServer/CGI-Executables/"

#
# "/Library/WebServer/CGI-Executables" should be changed to whatever your 
ScriptAliased
# CGI directory exists, if you have that configured.
#

AllowOverride None
Options None
Order allow,deny
Allow from all




So, the correct path is:
  http://localhost/cgi-bin/printenv

But on my system, that also fails, /var/log/httpd/error_log shows:

[client 127.0.0.1] file permissions deny server execution: 
/Library/WebServer/CGI-Executables/printenv

Checking that file, 

% ls -ld /Library/WebServer/CGI-Executables/printenv

Shows me that its executable bits aren't set. If I set those,

% sudo chmod +x /Library/WebServer/CGI-Executables/printenv

The URL,

  http://localhost/cgi-bin/printenv

now works. For safety, though, it's good to disable CGIs that you don't 
actively need with:

% sudo chmod -x /Library/WebServer/CGI-Executables/printenv

just in case someone finds a security flaw with one of the factory-installed 
CGIs.

-Charles
 [EMAIL PROTECTED]



Re: Comments not working

2002-01-22 Thread Charles Albrecht

At 5:53 PM +0100 1/22/2002, Brad Paton wrote:
>Anyone have any clues why a perl script run from the command line 
>would stop parsing after reading a commented line? When I invoke the 
>script via "perl p1.pl" from the shell without a "#!/usr/local/perl" 
>comment on the first line, it works fine, but with it, or any other 
>comment, the script stops executing any code following the comment.
>
>TIA
>
>brad

Are you using unix newlines (linefeeds) for your file? I would expect 
this behavior with traditional Mac newlines (carriage returns). Many 
text editors allow you to toggle the type of line endings before 
saving a file.

(The file appears as a single line to Perl. Everything after the first 
"#" looks like a comment.)

-Charles
 [EMAIL PROTECTED]



Re: Help with Perl on MacOSX

2002-01-11 Thread Charles Albrecht

Good point. I thought about that later. For cases like cron jobs, there's 
no real shell context, so it's got to be the kernel.

-Charles

At 2:54 PM -0800 1/10/2002, Wilfredo Sánchez wrote:
>   The kernel does #! processing, not the shell.
>
>   -Fred
>
>On Thursday, January 10, 2002, at 07:49  AM, Charles Albrecht wrote:
>
>> But in this case, the problem wasn't with Perl. It was tcsh (most 
>> likely)
>> on the BSD side of things that couldn't figure out what executable to 
>> run
>> the shell script with. It couldn't figure out a path to something 
>> called:
>>
>>   /usr/bin/perl^Mprint "Perl on Mac OS X\n";




Re: Help with Perl on MacOSX

2002-01-10 Thread Charles Albrecht

At 1:36 AM -0600 1/10/2002, Ken Williams wrote:
>
>How is Terminal supposed to know what kind of line endings you want?  I 
>create lots of text files in both formats.  I don't think the solution 
>lies in fixing anything about Terminal.  I think I agree with Chris, it 
>would be nice if perl were a little more agnostic about line endings in 
>its scripts.

But in this case, the problem wasn't with Perl. It was tcsh (most likely) 
on the BSD side of things that couldn't figure out what executable to run 
the shell script with. It couldn't figure out a path to something called:

  /usr/bin/perl^Mprint "Perl on Mac OS X\n";

In the /usr/bin/ directory, there isn't an executable called perl^Mprint 
with an embedded carriage return in its name. Even when Perl is able 
to handle multiple line ending formats, you'll run into this problem. 
(And receive the error "../mac_perl.pl: Command not found.")

In Chris' example, I think vim used Mac or DOS line endings rather 
than unix ones, most likely based on its fileformats settings, 
http://www.vim.org/html/options.html#'fileformats' Terminal and the 
pasteboard, it turns out, were behaving well. It was, as is usually 
the case with this sort of problem, an issue with the text editor.

-Charles
 [EMAIL PROTECTED]

-- 
Charles Albrecht  Euonymic Solutions
[EMAIL PROTECTED]   P.O. Box 300623
C>303.619.7596  F>978.334.3061   Denver, Colorado 80203-0623
 



Re: Help with Perl on MacOSX

2002-01-09 Thread Charles Albrecht

At 6:34 PM -0600 1/9/2002, Chris Devers wrote:
> 
>I created that script by pasting from one Terminal window's email client
>to another's Vim editor, so the line endings got screwed up while passing
>through the system clipboard. Should OSX Perl be more tolerant of this
>sort of thing? Pasting isn't exactly an unusual operation...

Terminal should be more clever with this. It's got an optional pref for 
"Translate newlines to carriage returns when pasting," I'm not sure if 
it would help in this case. I'm unable to get the same behavior 
when pasting into vi, so it might be an issue with Vim - it may have 
assumed you wanted things saved with CR instead of LF. Actually, 
considering the fact that you got output from cat on separate lines, 
rather than crammed onto one, vim may have saved it with CRLF.

-Charles Albrecht
 [EMAIL PROTECTED]



Re: Help with Perl on MacOSX

2002-01-09 Thread Charles Albrecht

At 7:12 PM -0500 1/9/2002, Anthony Mason wrote:
>Hello,
>
>[localhost:~] anthonym% ./mac_perl.pl
>../mac_perl.pl: Command not found.
>[localhost:~] anthonym%
>
>
>I cannot get my Perl code to execute.  Do you have any idea what I'm 
>doing wrong?  Here is the file source:

It looks like you've got the wrong line endings (Carriage Returns instead 
of Line Feeds). Use:

% perl -pi -e 's/\015/\012/g' mac_perl.pl




Re: Dueling Double Dock Icons?!?!

2001-12-17 Thread Charles Albrecht

At 3:09 PM -0500 12/17/2001, Robert Mah wrote:
>Quick followup -- if I wait long enough (30 seconds or so) the first icon
>actually does stop bouncing.  But you still can't select it and it doesn't
>have the "running" indicator triangle.

Does it have the normal menu items "Show in Finder," "Keep in Dock," etc?

-Charles
 [EMAIL PROTECTED]



Re: Virus alert message

2001-09-21 Thread Charles Albrecht

On Friday, September 21, 2001, at 12:54  PM, Steve Torrence wrote:

> Is it possible with Perl (or is something else better) to create a script 
> that would alert the administrator of a code red type worm that his 
> machine was infected. I know os x can not get infected by this but my 4 
> webservers are getting hammered by it and my bandwidth is dwindling. I 
> know one webserver that has a great way of handling this. It's:
>
> 

I saw an article on perl.com or use.perl.com in the last couple of 
weeks that detailed a module (Apache::Codered or something like that) 
which does much of what mdg's WS4D app does.

Personally, I've taken a mostly isolationist approach. What I've seen 
on Nimda says that half the time it chooses IPs which match the first two 
octets and an additional quarter match the first octet. By placing a 
filter on my router to block anything matching the first octet and 
then explicitly allowing ranges within that of legitimate previous 
accesses, I've cut the probe rate dramatically.

I'm down from ten or twelve nimda probe runs an hour to one an hour 
after applying the filters and lately, the last two were separated by 
nearly 23 hours.

-Charles
 [EMAIL PROTECTED]



Re: making a file executable

2001-07-19 Thread Charles Albrecht

[EMAIL PROTECTED] wrote:
>Thanks for your suggestions Ken
>
>I've included the script below for perusal, it basically kills any 
>apps which are open at the time of invokation - I got fed up doing it 
>manually and didn't want to write an Applescript to do it. It works 
>as expected when run from the command line using 'perl  script.pl', 
>but fails silently when I try to call it by name, even after forcing 
>OSX to place it in  "/usr/bin/"

Robin, 

I set up the script as you indicated and it functioned correctly for me.

I would agree with Ken Williams' suggestion that your line endings are off.

If you do:

 % cat `which App_reaper.pl`

Does the entire script appear on a single line?

If so, then something along the lines of

 % sudo perl -pi -e "tr/\r/\n/" /usr/bin/App_reaper.pl

should fix you up.

-Charles
-- 
Charles Albrecht P.O. Box 300623
[EMAIL PROTECTED]  Denver, Colorado
C>303.619.7596  F>978.334.306180203-0623
%PGP = ('E5DD3CAE', [2048,'E6DDEEF8BC B59715E8E6 0AEE364FB7 69E5DD3CAE'])