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:
 
link rel=icon href=/favicon.png type=image/png


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: 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
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: 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: 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+Daypassword=fredcurrTime=64730oldText=id=dec6done=

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: 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' script).

After that, assuming you've got a workable shebang (#!/usr/bin/perl or similar) at 
the beginning, you should be fine--your only worry would be any MacPerl-specific 
modules your script may have used.

The other bits are setting the script to be executable and making certain
it's in your path.

  chmod 755 perl_script.pl

Then,

  ./perl_script.pl

-C



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: 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: 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: 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: 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

   command ; exit

but there are times when I would like to have
something that runs as

   command

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...

keyExecutionString/key
stringssh foo.bar.baz; exit/string

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: 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: 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: 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: 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
C303.619.7596  F978.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: 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: 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:

IfModule mod_alias.c
#[.. 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.
#
Directory /Library/WebServer/CGI-Executables
AllowOverride None
Options None
Order allow,deny
Allow from all
/Directory

/IfModule

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: 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]