Re: location of 'com.apple.versioner.perl'

2010-07-10 Thread Chris Devers
On Fri, Jul 9, 2010 at 6:42 AM, Packy Anderson  wrote:
> On Fri, Jul 9, 2010 at 6:39 AM, Alan Fry  wrote:
>
>> However for the life of me I cannot find the file
>> 'com.apple.versioner.perl.plist' on that machine. It is not in
>> /Library/Preferences. What am I missing?
>>
>
> Did you also look under ~/Library/Preferences?

It's ~/Library/Preferences/com.apple.versioner.perl.plist

Here's how you prove it, and any other questions like this:

1/ In one Terminal window, run `sudo filebyproc.d | grep -i plist`
2/ In another Terminal window, run the defaults command in question
3/ In the original window, hit ctrl-C to cancel, then examine the results.

Here's what filebyproc.d reported for me:

$ sudo filebyproc.d | grep -i plist
dtrace: script '/usr/bin/filebyproc.d' matched 3 probes
  1  18510   open:entry backupd-helper
/private/var/db/.TimeMachine.Results.plist
dtrace: error on enabled probe ID 1 (ID 19296:
syscall::open_nocancel:entry): invalid address (0x7fff5fc2dc7f) in
action #2 at DIF offset 24
  1  19296  open_nocancel:entry defaults
/Users/cdevers/Library/Preferences/com.apple.versioner.perl.plist.GWghJmY
  1  18510   open:entry mdworker
/Users/cdevers/Library/Preferences/com.apple.versioner.perl.plist
$

Tweak the grep filter as needed and you can use this trick to isolate
all kinds of weird "what file is that damned thing looking at" type
questions.


--
Chris Devers


Re: Dumb path question

2009-03-11 Thread Chris Devers
The solution I went with, which seems to work for initial testing, is
roughly as follows:

use File::Basename;
use Cwd qw[realpath];

my $opts_tool = get_optstool();
system("/usr/bin/open '$opts_tool'") and die "Couldn't execute $opts_tool: $!";

sub get_optstool {
my $optstool = "Optimize Mac.app";
my $cur_path = dirname(realpath $0);
my $rel_path = "../Resources";
my $opts_loc = "$cur_path/$rel_path/$optstool";
return $opts_loc;
}

Written that way so that If I later want to call out to a different
tool, it's clearer to me what will need to be tweaked to do so.

Keep in mind that, by being wrapped in a Pashua GUI on the Mac, the
GUI user will be invoking this from wherever it happens to be on their
filesystem, which in turn means that the Finder or Launch Services or
what have you ends up being responsible for handing off the runtime
environment to the script.

This approach seems to work so far for the use cases I'm picturing --
the /Applications folder, a random folder with a space character in
the path, a USB drive, and a network drive.

(Part of me wonders if this whole thing would have worked better in
Camelbones as one app instead of two, but one of the constraints is
that some of the things it will do won't require admin access, but
other things will, so I have to be able to prompt for a password if
certain options are selected, then hand that off to the helper app[s]
accordingly. I didn't really see how to get a single app to force that
prompt if it's needed.)


-- 
Chris Devers

On 3/10/09, Doug McNutt  wrote:
> At 20:25 + 3/10/09, John Delacour wrote:
>>At 21:10 -0600 9/3/09, Doug McNutt wrote:
>>
>>>At 22:24 -0400 3/9/09, Chris Devers wrote:
>>>>How can a Perl script reliably, portably resolve the path inside which
>>>>it is running?...
>>>
>>>$0  That's a zero.  Has always worked for me to produce a full path
>>>to a running perl script.
>>>
>>>...There is a module "cwd"...
>>
>>or rather Cwd.  $0 will give the name but not the full path, so I'd suggest
>>the following:
>>
>>#usr/bin/perl
>>use Cwd;
>>my $currentdir = cwd();
>>print "$currentdir/$0\n";
>
> Interesting.  It turns out that I rarely call a stored perl script
> without specifying a full path in the call. I'm getting a full path
> in $0 when I do that. There may be more to think about.  The stuff I
> just checked calls the script itself which has been made executable
> rather than making a call to perl with the argument being the path to
> the script. I also don't know about a stored script placed in a
> directory that's included in $PATH but is not in $PWD.
>
> "portable" seems to be the key here.  Modules good for that.
>
> --
> -> Stocks are getting pilloreid <-
>


-- 


-- 
Chris Devers


Re: Dumb path question

2009-03-10 Thread Chris Devers
On Mon, Mar 9, 2009 at 10:33 PM, Chas. Owens  wrote:
>
> $0 holds the path to the currently executing file (including the
> filename).  Often this is a relative path, so you will want to call
> Cwd's realpath on it to get the absolute path.  Then call dirname on
> it to find the directory the script is in.  All of this is in Core
> Perl, so it should be portable to any platform Perl works on.
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> use File::Basename;
> use Cwd qw/realpath/;
>
> print dirname(realpath $0), "\n";

Ta, that did it.

I was forgetting about Cwd, now it seems to work fine.

Thanks!


-- 
Chris Devers


Dumb path question

2009-03-09 Thread Chris Devers
This isn't necessarily a Mac-specific question, but I've gotten rusty 
and I'm having a brain fart here.

How can a Perl script reliably, portably resolve the path inside which 
it is running? Not the PWD of the caller, mind you, but the actual 
current full path of the script itself?

Context: I have a pair of utility apps meant to be run in tandem. The 
first is a Pashua questionnaire that shows some forms and saves results 
to a file. The second is a Platypus script that gets admin access (hence 
needing another app -- I couldn't see how to get Pashua to prompt for 
admin access), then uses the results from the first app to do some 
`defaults write ...` & `sudo networksetup ...` type system calls.

Because the apps are meant to be distributed & run together, I've placed 
the second one inside the Contents/Resources/ folder of the first one, 
which finishes with (simplifying slightly):

  my $helper = "$ENV{'PWD'}/../Resources/Helper.app";
  system("/usr/bin/open "$helper'") and die "Couldn't run $helper: $!";

If I first put the first app in /Applications, this works fine.

The problem is I can't rely on $ENV{'PWD'} having something useful. If I 
move the parent app from /Applications (to the Desktop, a USB drive, a 
disk image, or a Samba volume), or if I invoke the Pashua script from a 
shell, then the $helper variable typically ends up with something 
useless (often but not always just "/../Resources/Helper.app") and the 
second app never executes.

I've thought of a few ways around this (e.g. wrap the whole thing in an 
installer package so I can force & depend on a single path), but they 
all seem cumbersome to varying degrees. Ideally, it should behave like, 
say, Firefox, where it will run the same way no matter where the user 
wanted to put (or not bother to put) the app bundle.

Is there a common way to do this? What $ENV variables can be relied on 
to have the full path to the running Perl script from which a working 
relative path can be derived? Is there some other way that this is 
already a Solved Problem, or should I just muddle through?

Any help very much appreciated :-)

Pashua:
http://www.bluem.net/en/mac/pashua/
http://macresearch.org/command_line_tutorial_part_iii_windows_of_opportunity

Platypus:
http://www.sveinbjorn.org/platypus
http://www.macresearch.org/command_line_tutorial_part_i_native_mac_apps_for_command_line_tools
http://www.macresearch.org/command_line_tutorial_part_ii_making_progress_and_finding_options



-- 
Chris Devers


Re: perl and apple mail?

2008-03-10 Thread Chris Devers

On Mar 10, 2008, at 7:24 AM, Joel Rees <[EMAIL PROTECTED]> wrote:


Are any of you using perl plugins with apple's mail browser?


What, you mean aside from SpamAssassin & procmail?

I've always felt it was easiest to just filter everything on the mail  
server, and not bother with whatever filtering abilities the mail  
client I'm using this month may or may not offer.


But then, I suppose this isn't a viable approach if you can't run  
software on the server.


If you can get off the ground at all in filtering with AppleScript,  
its fairly easy to just write '...do shell script...' and switch to  
Bash / Perl / etc from there. That may be a good approach here.


That or fetchmail piping into local SpamAssassin/procmail/etc filters,  
but oh look I'm getting silly again.



--
Chris Devers


Re: Mac OS alias from Perl

2007-12-08 Thread Chris Devers
On Dec 8, 2007, at 7:06 PM, Celeste Suliin Burris <[EMAIL PROTECTED] 
> wrote:


Use a symbolic link instead.  Perl handles those natively, and they  
can be
accessed from the command line. The Finder just treats them the same  
as

aliases.





Not quite. I forget the details at the moment, but Finder aliases are  
kind of like "firm links": while hardlinks point to inodes, and  
softlinks point to file pathnames, aliases point to the logical file  
in a more robust way than symlinks. For example, if the reverent file  
moves, symlinks break, but aliases shouldn't.


If you really want aliases, I think the CPAN modules of Dan Kogai and  
Chris Nandor are the place to start. I forget who wrote what, but  
modules like (I think) MacOS::File and Mac::Glue can either make the  
right calls directly, or leverage Applescript / OSAscript to do this  
for you.


Or if symlinks/softlinks are enough, just use the traditional Perl /  
Unix methods to make those.



--
Chris Devers 


Re: Detecting OS X version from perl

2007-11-20 Thread Chris Devers
On Sun, 18 Nov 2007, Michael Barto wrote:

> Everyone has suggested "system_profiler" for the hardware stuff. But 
> it appears that I will need do some parsing with
>
> $ grep -A1 'BundleShortVersion' 
> /Library/Receipts/*.pkg/Contents/version.plist | grep string

...keeping in mind that that isn't going to work for anything that 
wasn't distributed in a package installer, e.g. nearly everything from 
Microsoft or Adobe, just to pick two piddling example vendors. 

> Seems not a simple solution for MacOSX for system managers who use 
> script to collection information about Unix systems. On the other 
> hand. MacOSX does support "df" and "ifconfig -a"

What do `df` and `ifconfig -a` have to do with software inventory 
cataloging? Does knowing how much disk is available, or what your IP 
address is, get you to knowing what version of Firefox (etc) you have?

Maybe it would be clearer if you said what you *really* need. It looks 
like we're answering what you asked for, rather than what you wanted. 


-- 
Chris Devers


Re: Detecting OS X version from perl

2007-11-17 Thread Chris Devers

On Nov 17, 2007, at 7:37 PM, Michael Barto wrote:

Just a quick question. Is there a command line at a terminal window  
of MacOSX that can do this- tell you more about the hardware?


Quick report:

$ system_profiler -detailLevel mini

Obsessive detail report:

$ system_profiler -detailLevel full


Also list software packages and their revisions and also patches?


You can get a lot of this from skimming through the /Library/Receipts  
folder, e.g.:


$ grep -A1 'BundleShortVersion' /Library/Receipts/*.pkg/Contents/ 
version.plist  | grep string


This works better up through Tiger; the package format changed with  
Leopard and there may be a new, better way to access that now (maybe  
run `lsbom` on files under /Library/Receipts, but that doesn't seem to  
have version data).


You can also just query the app directly, modifying the example above,  
as:


$ grep -A1 'BundleShortVersion' /Applications/*.app/Contents/ 
version.plist  | grep string


Which now that I think about it probably the way to go, as it's  
largely the same data as the Receipts folder, but also includes things  
that don't have an installer (e.g. Firefox, Skype, Adium) and things  
with a third-party installer (Microsoft Office, the Adobe CS suite,  
StuffIt, etc).


 * * * * *

On a different tack, since this thread has come back up, I forget if  
it was mentioned the first time around, but the system version and  
build should always be available from:


$ cat /System/Library/CoreServices/SystemVersion.plist

This is useful if you ever need to check, say, a remote file server,  
or a machine in Firewire target mode, where you can't query  
system_profiler, sw_vers, etc.


If you do the same for the Finder --

$ cat /System/Library/CoreServices/Finder.app/Contents/ 
version.plist


-- it may or may not be in step with the SystemVersion (it probably  
would be, but checking the system itself is more direct).



--
Chris Devers


Re: Thanks Apple! You snubbed perl yet again!

2007-10-19 Thread Chris Devers
On Fri, 19 Oct 2007, [EMAIL PROTECTED] wrote:

> On Oct 19, 2007, at 2:51 AM, Chris Devers wrote:
> 
> > On Fri, 19 Oct 2007, [EMAIL PROTECTED] wrote:
 
> I can draw a picture for you: http://finkproject.org/

In which case, your real argument appears to be "the Fink people don't 
seem to be doing what I need fast enough."

In which case, the response is "you should contribute to Fink then".
 
> [...] I, as a developer, should maintain the latest version of perl on 
> my machines. I give in!

Yes, if that's really what you need. I still think it isn't the end of 
the world to just work with the bundled version of Perl (along, of 
course, with whatever CPAN modules you need). It's not like 5.8.6 or 
5.8.8 are such awful, archaic versions to work with in the first place.
 
> > So target the release version, or do like everyone else that's 
> > concerned about this and install your own Perl. It's not hard to do, 
> > and it's really not that different than how things are on Debian.
> 
> Yes it is. debian's packages are updated constantly, not just in point 
> releases. So if there is a problem a new package is made available 
> relatively quickly.

Maybe my Debian experience is too limited then, but this seems like a 
slightly glossed over version of things to me. 

The last time I spent a lot of time with debian (roughly 2003-2005), it 
was still on 3.0/Woody. Yes, there was a constant stream of package 
updates, but IIRC they were all security patches, critical bugfixes 
(with a *really* conservative definition of "critical" -- merely 
braindead usability brokenness never seemed to be worth patching), etc. 
It seems like most of the updates we were getting were via backports.org 
rather than official updates to Woody itself. 

Maybe things have evolved since then, but at the time it seemed like if 
an update wasn't for security or a real showstopping bug (e.g. keeps the 
machine from booting, or a critical daemon from running), then it was 
seen as a "mere features update" and got deferred until 3.1/Sarge. If 
you wanted those "features" updates, you had to get them from backports 
or roll your own. Maybe as a backlash, I seem to remember that this is 
around when Ubuntu et al branched off to be a more current platform.

This seems like exactly the stance that we're talking about here, and as 
frustrating as it can seem, there are really good reasons to do things 
this way, not least being stability & predictability for developers, who 
can assume confidently that release X is going to have Perl v.Y, etc.

 * * * * *

As for supporting Fink (or something like Fink), I think that's a super 
idea, but it seems like an idea that has been floating around for years 
and never gotten off the ground, for whatever reason. Maybe I'm just 
assuming that if it hasn't happened by now, maybe it never will...



-- 
Chris Devers
DO NOT LEAVE IT IS NOT REAL


Re: Thanks Apple! You snubbed perl yet again!

2007-10-18 Thread Chris Devers
On Thu, 18 Oct 2007, Chris Devers wrote:

> I can't picture Debian taking the effort to port what they're doing to a 
> new platform, and expectially not a proprietary one

"Expectially"? Well done, Chris. Well done indeed. :-)

That should of course have been "especially". :-)


-- 
Chris Devers


Re: Thanks Apple! You snubbed perl yet again!

2007-10-18 Thread Chris Devers
On Fri, 19 Oct 2007, [EMAIL PROTECTED] wrote:

> On Oct 18, 2007, at 11:40 PM, Chris Devers wrote:
> 
> > Sorry, I'm confused -- why not just use Debian then?
> 
> Yes.

"Yes" isn't a conventional answer to a "why not" question, but... sure. 

> > You're basically saying you want their custom build & distribution 
> > service, but that is (naturally, one might think) only available on 
> > their Linux distribution.
> 
> When you say 'their', who do you mean? If you mean debian, well yes. 
> Everyone who uses debian stable gets this custom build system, that is 
> the point of debian.

Yes, "Debian" was the last [proper] noun there, so the pronoun "their" 
does indeed mean "Debian". Well done. 

Back to the point, this is what I'm confused about. If what you want is, 
pretty narrowly described, Debian's distribution system, then why are 
you looking elsewhere? Are you saying Apple should adopt it wholesale? 

I can't picture Debian taking the effort to port what they're doing to a 
new platform, and expectially not a proprietary one, so it would have to 
be a case of Apple either backporting Debian's patches & packages, or 
duplicating the effort with the same intent but from scratch. I'm not 
sure I can picture either of these things happening.
 
> > Apple already maintains the core OS software, including bundled open 
> > source packages like Perl,
> 
> Apple maintains Apple's version of the so-called open source software, 
> but it does very little maintenance of community software or perl in 
> general.

You must not have been paying attention to this thread. 

Within a stable release of the OS (10.3.x, 10.4.x, 10.5.x, etc), there's 
only security updates -- which, iirc, is exactly what Debian does.
 
When transitioning between major releases (10.3 -> 10.4, 10.4 -> 10.5), 
things are updatedto the currently available stable version -- which, 
iirc, is also exactly what Debian does.

How is this so different? 

As for community software, you've got me there. I can't think of any 
examples at all of Apple offering things to the community. Aside from 
Webkit. And launchd. Oh and Bonjour. Oh and CUPS, if you're in to that 
whole "printing" thing on your Debian machines. Oh and well I guess 
Darwin & the mach kernel also count. Oh and I think some patches back to 
the GCC suite, last I checked. But aside from those examples, you're 
right, there's absolutely no community software available from Apple, 
and certainly there doesn't seem to be any on CPAN.

> I want 5.10 to work without hassle on OS X (Leopard).

Maybe we need to define "hassle", but the concensus from everyone else 
seems to be that installing your own copy is unlikely to be difficult, 
once it comes out. Remember: a lot of the core Perl developers are Mac 
users, so they'll already have been testing it there during development 
rather than just porting to it post-release.

> I want my code to be run cross platform (I am talking CGI here - still 
> there are big differences between LAMP and {M,A}AMP)

Care to elaborate? Most generic CGI scripts will run with only minor 
modification on most versions of Perl, including Windows. 

If you want the same code to run verbatim on a bunch of different 
platforms, I think the general wisdom is that you're going to have to 
target a common denominator, which will mean both [a] a version of the 
software that is available on the shipping versions of everything you 
target, and [b] a subset of the language functionality that has been 
proven to work on all the target platforms you're thinking of. 

If you go against either of those assumptions, then of course things are 
not going to be as smooth as you're hoping for.

> I want the time and effort I invested in learning perl to be useful 
> for developing native applications on Mac OS X. (I am willing to learn 
> how to use CamelBones to accomplish this. Right now I think it best I 
> learn Objective-C.)

"Native" contradicts "cross-platform", but whatever. As Sherm said, 
you'll be able to do this, but it's not going to be bundled (and 
therefore you may have a harder time packaging anything written this way 
for general release distribution on Leopard, unless you also bundle up a 
copy of Camelbones et al). 

Keep in mind that Ruby & Python will also work for this, and  
they're both pretty good languages, too .

> I am just asking for a reasonable, up-to-date, development environment 
> so that I do not have to shell into a linux server to do the job I 
> need to do.

So target the release version, or do like everyone else that's concerned 
about this and install your own Perl. It's not hard to do, and it's 
really not that different than how things are on Debian. 


-- 
Chris Devers


Re: Thanks Apple! You snubbed perl yet again!

2007-10-18 Thread Chris Devers

On Oct 18, 2007, at 4:43 PM, [EMAIL PROTECTED] wrote:


On Oct 18, 2007, at 8:56 PM, Chris Nandor wrote:


Not sure what you mean by
losing things from upstream.


Just that when I chose to compile software on my own, I lose all the  
debian security work.


They look over packages and report vulnerabilities, I can just  
update with apt-get and get a new version - if I compile from source  
then I have to follow security warnings for the software I installed  
on my own. This is not a big deal if we are just talking about two  
or three applications, but if you are supporting a platform or a  
distribution, having the debian security do security for thousands  
of packages becomes a service that money cannot buy.


Sorry, I'm confused -- why not just use Debian then?

You're basically saying you want their custom build & distribution  
service, but that is (naturally, one might think) only available on  
their Linux distribution.


Apple already maintains the core OS software, including bundled open  
source packages like Perl, but if that isn't enough for you, and  
Debian is, then what exactly are you asking for?


Re: Detecting OS X version from perl

2007-10-14 Thread Chris Devers
On Oct 14, 2007, at 6:56 PM, David Cantrell <[EMAIL PROTECTED]>  
wrote:



On Sun, Oct 14, 2007 at 10:45:30AM -0700, Edward Moy wrote:


% perl -e 'chomp($vers = `sw_vers -productVersion`); print "$vers\n"'
That will get you either 10.x or 10.x.y.  You just need to strip off
the .y if it is there.


Perfect, thanks!


If for whatever reason that lets you down (e.g. trying to get the  
version of a host you have mounted via AFP / NFS / Samba / etc), you  
should also be able to poke in


/System/Library/CoreServices/SystemVersion.plist

which is basically the same info as sw_vers reports, but wrapped in XML.


--
Chris Devers


Re: Leopard Perl version...

2007-10-13 Thread Chris Devers
On Sat, 13 Oct 2007, [EMAIL PROTECTED] wrote:

> Date: Sat, 13 Oct 2007 20:50:22 +0200
> From: [EMAIL PROTECTED]
> To: Edward Moy <[EMAIL PROTECTED]>
> Cc: MacPerl Perl 
> Subject: Re: Leopard Perl version...
> 
> Hmm, are you sure you did not update your perl yourself? I have a 
> Macmini from April 2007 (OS X 10.4.10) and it says:
> 
> $ perl -v
> 
> This is perl, v5.8.6 built for darwin-thread-multi-2level

*ahem*

Go back and read Mr Moy'ss email address. 

He may be in a position to answer this question definitively. :-)


-- 
Chris Devers


Re: CamelBones: Will hack for food!

2007-05-09 Thread Chris Devers

On May 9, 2007, at 4:32 PM, Daniel T. Staal wrote:

Macs desperately _need_ a an app to manage third-party software  
updates.

Something that you could run periodically to keep software up to date,
avoiding having every seprate program connect to the internet on  
startup

and check for itself.


A good idea.

But <http://metaquark.de/appfresh/> may have beat you to it. :-)


--
Chris Devers




Re: anyone know where i can get 10.3 Developers Tools?

2006-07-28 Thread Chris Devers
On Fri, 28 Jul 2006, Ken Williams wrote:

> Wasn't it included in /Applications/Installers/ on 10.3?  Or was that 
> just for certain hardware models?

Yes, for machines that shipped with 10.3. 

It should also be on the restore discs for the same machines.

In a pinch, it doesn't have to be the "right" disc, either. E.g. if you 
have an iBook and an iMac and can only find the iBook's installation 
CDs, you can use them to install XCode on the iMac. (You wouldn't be 
able to install OSX itself, but that isn't the problem here anyway.)

Hope this helps..


-- 
Chris Devers
DO NOT LEAVE IT IS NOT REAL


Re: file creator id, etc

2006-06-08 Thread Chris Devers
On Fri, 9 Jun 2006, Joel Rees wrote:

> Not a perl topic, but isn't there a Finder setting that determines 
> whether Get Info allows access to this or not?

Not a Perl solution (or is Ruby close enough to count?), but 
RCDefaultApp may help with problems like this:

http://www.rubicode.com/Software/RCDefaultApp/ 
 


-- 
Chris Devers


Re: Waiting until Acrobat closes file

2006-05-27 Thread Chris Devers
On Sun, 28 May 2006, David Cantrell wrote:

> if instead you're doing something like ...
> 
> system('open', '/Applications/Acrobat.app');
> 
> then you'll need to:
> 
> wait around until Acrobat appears in the process table;
> wait around until that PID disappears;

Really??

In my experience, the `open` command immediately returns control to the 
controlling process (the shell, or whatever else invoked it (pine etc)) 
without waiting for the `open`ed application to finish, or for that 
matter even to finish launching. 

If you're going to use acroread, then [a] you have to install it, and 
[b] you have to view the document in X11. Yuck. Surely that isn't really 
the best way to approach this, is it? I'd have thought that the `open` 
command was the perfect answer to this question...
 
system('open', '/Applications/Preview.app');

etc.



-- 
Chris Devers
DO NOT LEAVE IT IS NOT REAL


Re: Storable problem on Intel Mac Mini

2006-05-12 Thread Chris Devers
On Fri, 12 May 2006, Joseph Alotta wrote:

> Why wouldn't it work to put the client code and perl on the USB 
> keydrive and then every ten minutes, your system will get it from 
> there instead of from your hard drive?  I realize the USB keydrive is 
> slower to load, but does that matter here?

I don't see any reason at all that one couldn't do this.

I was only pointing out that a RAM drive is a different thing :-)



-- 
Chris Devers
DO NOT LEAVE IT IS NOT REAL


Re: Storable problem on Intel Mac Mini

2006-05-12 Thread Chris Devers
On Fri, 12 May 2006, Joseph Alotta wrote:

> > My instant reaction to that would have been putting a stripped-down 
> > whitebox running OpenBSD as a logging firewall between the G5 and 
> > the 'net, to check for attacks on the mail and ftp subsystems.
> 
> Can you tell me what a whitebox is?

Generic cheapo x86 computer. Possibly home-built from scrap parts.

http://en.wikipedia.org/wiki/Whitebox_computer

> > I have my personal web site on my old clamshell iBook, and it runs a 
> > dynamic DNS client every ten minutes via cron. That basically keeps 
> > the disk spinning constantly. Burned out a drive last year, and I'm 
> > worried it will burn out a drive this year. So I'm thinking of 
> > putting the client on a RAM disk, although, since I wrote the client 
> > in perl, I suspect that I'd then have to copy perl itself to the RAM 
> > disk as well.
> 
> RAM disks are so cheap now.  I saw a 64MB USB on google for $8.97.

Tht's a flash RAM devive, not a RAM disk. Different thing. 

http://en.wikipedia.org/wiki/RAM_drive



-- 
Chris Devers
DO NOT LEAVE IT IS NOT REAL


Re: Storable problem on Intel Mac Mini

2006-05-12 Thread Chris Devers
On Fri, 12 May 2006, Joel Rees wrote:

> On 2006.5.12, at 10:01 AM, Mike Schienle wrote:
> 
> > I just installed an Intel Mac Mini as a replacement for a dual 1.8 
> > GHz G5 at my colocation place a couple days ago.
> 
> Can I ask a silly question in public, or would off-list be more 
> appropriate?
 
Onlist, please -- if your question is my question, we might both be 
fascinated by the answer... :-) 


-- 
Chris Devers
DO NOT LEAVE IT IS NOT REAL


Re: Terminal (spurious command line) problem

2006-04-18 Thread Chris Devers
On Tue, 18 Apr 2006, Sherm Pendley wrote:

> On Apr 18, 2006, at 2:30 PM, Brian McKee wrote:
> 
> > Start Terminal.app and check under preferences (apple-,)
> > If you don't see it there, quit Terminal,  backup and delete
> > ~/Library/Preferences/com.apple.Terminal.plist
> 
> It's not a great idea to manipulate preference files directly. Their 
> location, filename, format, etc. are considered an implementation 
> detail that's subject to change without notice. Apple has already made 
> at least two changes, from old-style plists to XML-based plists, and 
> then from that to a binary file format.
> 
> The Apple-recommended way to deal with the user defaults database from 
> a shell prompt is to use the "defaults" tool, like this:
> 
>   defaults delete com.apple.Terminal
> 
> Naturally, there are both Cocoa and Carbon APIs to do this 
> programatically also.

All of which is true.

That said, I still find this easier & potentially safer:

mv ~/Library/Preferences/com.apple.Terminal.plist{,.MOVED} 

The main benefit being that if this doesn't actually solve the problem, 
you can trivially reverse the change with a 

mv ~/Library/Preferences/com.apple.Terminal.plist{.MOVED,} 

(And all that said, renaming preference files and deleting caches under 
your ~/Library/Caches tree are both common diagnostic tricks when things 
aren't working. In most cases, zapping files in either of these trees 
shouldn't cause any problems, since if the needed files are missing, the 
applications will regenerate a known-good version of the preference or 
cache file -- the same way it did the first time you used them. But 
then, at a glance, it doesn't look like Terminal uses caches, so that 
wouldn't apply here, but the broader point still stands -- preferences 
and caches are generally easy & safe to rename or remove when trying to 
diagnose software problems.)


-- 
Chris Devers
who *ahem* does this sort of thing for people for a living :-)


Re: CPAN modules ...

2005-12-31 Thread Chris Devers
On Sat, 31 Dec 2005, John Delacour wrote:

> Try this:
> 
> #!/usr/bin/perl
> print `/usr/bin/./printenv`
  ^^ 
  ^^ 

Why the '/./' here?

Isn't `/usr/bin/printenv` equivalent, clearer, and simpler? 


-- 
Chris Devers
DO NOT LEAVE IT IS NOT REAL


Re: CPAN modules ...

2005-12-29 Thread Chris Devers
On Fri, 30 Dec 2005, Joel Rees wrote:

> >[CP_ERROR] [Mon Dec 26 14:07:55 2005] Fetching of
> >   'ftp://ftp.cpan.org/pub/CPAN/authors/id/G/GA/GAAS/CHECKSUMS'
> >   failed: Command failed:
> [...]
> > This hand installation usually works, but it would be very convenient if
> > I could make CPANPLUS ar CPAN work. Any suggestions?
> 
> Choose a less busy mirror?
 
And/or check that passive-mode FTP is enabled? (Hint: $ENV{FTP_PASSIVE} 
is the one you need, if I remember right...) 


-- 
Chris Devers
DO NOT LEAVE IT IS NOT REAL


Re: CPAN modules not included with OS X

2005-12-29 Thread Chris Devers
On Thu, 29 Dec 2005, James Reynolds wrote:

> Does anyone know why Apple chooses or not chooses to include modules? 
> I really dislike installing them.  And more and more I find I need to.  
> So how would I go about pressuring Apple to include more.

No vendor includes a full CPAN library with the stock Perl. Linux, 
Solaris, etc, they're all doing the same thing.

If you install your own copy of Perl, it too will only have a partial 
standard core fraction of CPAN. 

Get used to CPAN. You aren't going to find a vendor that provides a full 
CPAN install -- new ones appear daily, so keeping up is impossible 
anyway. 

There has been talk of including fewer CPAN modules with future versions 
of Perl, to get people into the habit of installing things when 
previously they might not have wanted to go beyond the core modules.

*shrug*


-- 
Chris Devers
DO NOT LEAVE IT IS NOT REAL


Re: psync and MacOSX::File installing with cpan

2005-07-08 Thread Chris Devers

On Fri, 8 Jul 2005, Joseph Alotta wrote:

So I tried to install MacOSX::File and got these errors.  Does anyone know 
what I am doing wrong?


I get the same result:

macgarnicle:~/.cpan/build/MacOSX-File-0.69 root# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/catalogok 3/7# Failed test 4 in t/catalog.t at line 33
#  t/catalog.t line 33 is: $asked eq "avbstcLinmed" ? ok(1) : ok(0);
t/catalogFAILED test 4
Failed 1/7 tests, 85.71% okay
t/copy...ok
t/file...ok
t/info...ok 6/10# Failed test 7 in t/info.t at line 38
#  t/info.t line 38 is: ok($asked eq "avbstcLinmed");
t/info...FAILED test 7
Failed 1/10 tests, 90.00% okay
t/spec...ok
Failed Test Stat Wstat Total Fail  Failed  List of Failed

-
t/catalog.t71  14.29%  4
t/info.t  101  10.00%  7
Failed 2/5 test scripts, 60.00% okay. 2/29 subtests failed, 93.10% okay.
make: *** [test_dynamic] Error 2
macgarnicle:~/.cpan/build/MacOSX-File-0.69 root#

We both got failures on t/catalog 3/7 and t/info 6/10.

The first failed test is:

use MacOSX::File::Catalog;
...
my $asked = askgetfileinfo("dummy");
$asked eq "avbstcLinmed" ? ok(1) : ok(0);

The second failed test is nearly identical:

use MacOSX::File;
use MacOSX::File::Info;
...
my $asked = askgetfileinfo("dummy");
    ok($asked eq "avbstcLinmed");

So... something wrong with askgetfileinfo() on Tiger maybe ?



--
Chris Devers


Re: Cat and Dos2unix Command Line Utilities?

2005-07-08 Thread Chris Devers

On Fri, 8 Jul 2005, Joseph Alotta wrote:


On Jul 8, 2005, at 9:26 PM, Chris Devers wrote:


#!/bin/sh
perl -pi -e "tr/\r//d"



I tried to call perl directly.  But this does not work
at all.  Does anyone know why?

#!/usr/bin/env perl -pi -e "tr/\r//d"

See, I was only trying to save you a line.  :-)


Yeah, but it doesn't really matter how complex the script is, so long as 
you can just do a


$ dos2unix file.txt

and get back a clean result.

If I was going to make any modifications to the file, rather than 
simplify it, I'd force it to quit rather than edit any binary file, as


$ dos2unix file.jpg

can be *really* disastrous the way it is now :-)

But if I cared *that* much, I'd just get dos2unix from Fink and be done 
with it. As it is, I almost never use this script in the first place, so 
leaving it as is works fine for me :-)



--
Chris Devers


Re: Cat and Dos2unix Command Line Utilities?

2005-07-08 Thread Chris Devers

On Fri, 8 Jul 2005, Lola Lee wrote:

 In the Makefile.PL is a workaround for Unix-like systems (using cat 
and dos2unix).  Does MacOS come with cat and dos2unix "command-line" 
utilities? If so, what are they called?  And what is the value of $^O? 
(darwin I think?)


Does this guy literally mean MacOS, or does he mean MacOS X ?

OSX is Unix, so it includes a copy of cat at /bin/cat, just like most 
other Unix variants do.


dos2unix doesn't seem to be available, but personally I have a trivial 
one in my ~/bin directory that's just:


$ cat ~/bin/dos2unix
#!/bin/sh
perl -pi -e "tr/\r//d"
$

Works a charm. Whatever this guy is doing that needs dos2unix, chances 
are excellent that he could get the same result with Perl itself with 
little or no effort. For that matter, chances aren't bad that he doesn't 
need to use `cat` either, as Perl can do that one too, but then I 
haven't actually looked at this package so I don't know how he's trying 
to use it; maybe it isn't really a Useless Use Of Cat :-)




--
Chris Devers


wildly off topic, sorry, was Re: question on Perl's ssh

2005-06-24 Thread Chris Devers
On Sat, 25 Jun 2005, Joel Rees wrote:

> msn.com and hotmail.com users take note --
> Microsoft wants to refuse my mail if I don't use SenderID starting November.
> SenderID was refused as an internet standard and does not stop SPAM,
  
> and it contains a Microsoft patented algorithm.
> Draw your own conclusions.
 
Not that I'm convinced it's a good idea, but...

IETF Approves SPF and Sender-ID

Posted by Zonk on 2005.06.24 15:57
from the protocols-forward dept.

NW writes "According to the records in the IETF's database (here
and here), both the SPF and Sender-ID anti-spam proposals were
tentatively approved by the IESG (the approval board of the
IETF) as experimental standards. It remains to be seen whether
any of them will actually put a dent into spam." At the same
time, the FTC has opened a central site about email authentication.

<http://slashdot.org/article.pl?sid=05/06/24/1921210&threshold=5> 
<https://datatracker.ietf.org/public/pidtracker.cgi?command=view_id&dTag=12662&rfc_flag=0>
<https://datatracker.ietf.org/public/pidtracker.cgi?command=view_id&dTag=12542&rfc_flag=0>
<http://spf.pobox.com/>
<http://www.microsoft.com/mscorp/safety/technologies/senderid/default.mspx>
<http://www.ietf.org/iesg.html>
<http://www.dmnews.com/cgi-bin/artprevbot.cgi?article_id=33190>




-- 
Chris Devers


Re: question on Perl's ssh

2005-06-24 Thread Chris Devers
On Fri, 24 Jun 2005, Ted Zeng wrote:

> Why the system behaves differently when I ssh to a machine from 
> Terminal than when I ssh to the same machine by Perl's SSH module?

It sounds like the script is getting the default system $PATH variable, 
while the shell is getting the $PATH defined in your login scripts. 

Specifying the full path to the tool you want may circumvent this.

Alternatively, your script can declare what $PATH to use, but without 
seeing the code, I'm not sure how best to do this. 

In any case though, if it's an option for you, using a full path would 
be easier than setting it manually.
 


-- 
Chris Devers


Re: ActiveState is announcing support for Mac OS X

2005-06-08 Thread Chris Devers
On Wed, 8 Jun 2005, John Delacour wrote:

> Why does not Apple update Perl through sofware update?

As I understand it, the rationale is that a lot of things depend on the
release of Perl that shipped with the system -- installers, startup
scripts, periodic daemons, etc.

If Perl were to be upgraded, then all the things that depend on it would
need additional rounds of QA testing with each release, but they don't
have the resources to support this.

Let's say, as a plausible example, that the iTunes installer uses Perl
for initial setup. As it is now, any iTunes update on Panther needs to
be tested with Perl 5.8.1, and any update on Tiger needs to be tested
against 5.8.6; all other releases can be ignored. If Apple were to
release revisions to Perl as they come out, then they'd have to start
testing each Panther version against all Perls 5.8.>1, and all Tiger
versions would have to be tested aginst 5.8.>6. (And that's not even
mentioning Jaguar, which might [?] still get iTunes updates, so that
would be all Perls from 5.6.1 and up.)

Clearly, things start multiplying fast.

And every combination in the matrix of release versions would have to be
tested, as different people will have different system update levels,
some will have skipped some packages, etc.

So, while I do wish that they made it simpler to put a newer version of
Perl somewhere like /usr/local, I can sympathize with the rationale for
not tampering with the version that ships as standard with each major
iteration of the system.


-- 
Chris Devers


Re: ActiveState is announcing support for Mac OS X

2005-06-08 Thread Chris Devers
On Wed, 8 Jun 2005, Sherm Pendley wrote:

> On Jun 8, 2005, at 9:41 AM, Janet Goldstein wrote:
>
> > People would use ActivePerl for OS X for the same reason Windows
> > users use ActivePerl
>
> Windows users use ActivePerl because Windows doesn't ship with Perl.

FWIW, ActiveState Perl is also available for Solaris; they also make
software available for AIX, HP-UX, etc. I'm not sure if these systems
tend to ship with Perl, but I know that Perl often runs on them.

In that light, I'm actually a little surprised that they didn't have a
version for Mac OS X sooner than this.

The timing of the announcement seems curious to me...



-- 
Chris Devers


Re: Parsing Jpeg files for comments

2005-06-08 Thread Chris Devers
On Wed, 8 Jun 2005, Robin wrote:

> I've googled about for this but to no avail:

Try search.cpan.org next time :-) 
 
> I'm making a perl frontend to a mySQL server to serve up images. Some 
> of the images are jpegs with keywords stored as comments in the file, 
> and I want to be able to access those comments through perl. Is there 
> a module which already exists which does this?

Yes:  Image::Info.

<http://search.cpan.org/~gaas/Image-Info/lib/Image/Info.pm>

Quoting from that page...

SYNOPSIS 

 use Image::Info qw(image_info dim);

 my $info = image_info("image.jpg");
 if (my $error = $info->{error}) {
 die "Can't parse image info: $error\n";
 }
 my $color = $info->{color_type};

 my($w, $h) = dim($info);

Accessing the comment field is a one-line change to this block.

Helpful?


-- 
Chris Devers

np: 'Everything to Play For'
 by Douglas Adams
 from 'H2G2: The Tertiary Phase'


Re: CamelBones on Intel? Maybe not.

2005-06-07 Thread Chris Devers
On Wed, 8 Jun 2005, John Horner wrote:

> My main question about the change to Intel is why the developer pack,
> whatever it was, costs so much? What do you get for your $999? I was
> expecting something free to download to developer members.

They throw in a Pentium4 / 3.x gHz computer with the deal.

Phrase it that way and it's actually kind of cheap... :-/


-- 
Chris Devers
still baffled by what this all means


Re: Did Strict get Stricter?

2005-06-03 Thread Chris Devers
On Fri, 3 Jun 2005, Elton Hughes wrote:

> I updated to 10.4.1 not to long ago and ran a script I had been using
> with 10.3.x without problems. Now I was getting error messages that
> did not appear before. It was just some little things that were easily
> fixed, (I re-used some variables that I thought were scoped properly),
> but it did make me wonder what all did change with Perl when we went
> to Tiger.

Perl got upgraded from a 5.8.1 beta to 5.8.6 stable.

A 10.3 machine:

$ sw_vers
ProductName:Mac OS X
ProductVersion: 10.3.9
BuildVersion:   7W98
$ perl -v | grep 'This is perl'
This is perl, v5.8.1-RC3 built for darwin-thread-multi-2level
$

A 10.4 machine:

$ sw_vers
ProductName:Mac OS X
ProductVersion: 10.4.1
BuildVersion:   8B15
$ perl -v | grep 'This is perl'
This is perl, v5.8.6 built for darwin-thread-multi-2level
$

I'm not sure what exactly changed between those versions, but if you
care to you can read the complete changelog -- up through 5.8.7 -- at:

<http://search.cpan.org/src/NWCLARK/perl-5.8.7/Changes>

You can also look over the perlNNNdelta files to see what major changes
each release delivered:

<http://search.cpan.org/dist/perl/pod/perl586delta.pod>
<http://search.cpan.org/dist/perl/pod/perl585delta.pod>
<http://search.cpan.org/dist/perl/pod/perl584delta.pod>
<http://search.cpan.org/dist/perl/pod/perl583delta.pod>
<http://search.cpan.org/dist/perl/pod/perl582delta.pod>
<http://search.cpan.org/dist/perl/pod/perl581delta.pod>



-- 
Chris Devers


Re: Net::FTP on Tiger

2005-06-03 Thread Chris Devers
On Sat, 4 Jun 2005, Iyanaga Nobumi wrote:

> Now, I am wondering if it is really necessary to set my Firewall "On"
> on a machine such as mine: it is connected to Internet permanently by
> the optical fiber, but it runs no server at all, and I use it strictly
> for my personal work...

Yes, you should, even -- maybe especially -- if you're not running any
servers.

Think of it the other way around: why allow unregulated traffic to flow
into and out of your computer? Especially considering that you have a
high speed connection to the internet, there's few good reasons to allow
strangers unfirewalled access to your computer.

If some specific application breaks down because the firewall is on, you
can "punch a hole" in the firewall by going into the Firewall tab of the
Sharing panel in System Preferences, but as a rule of thumb, it's
generally considered best to leave the firewall turned on and with as
few open ports as you can get away with.

> And perhaps adding "Passive => 0" to my "Net::FTP->new" line (like
> the following line...:
>
> $ftp = Net::FTP->new($domain, Debug => 0, Passive => 0)
>
> ) would solve the problem?

Yes, this sounds like the fix you're looking for.



-- 
Chris Devers


Re: Net::FTP on Tiger

2005-06-03 Thread Chris Devers
On Fri, 3 Jun 2005, Morbus Iff wrote:

> That's a new behavior then, right? I thought that checkbox
> existed under previous versions of OS X, but affected only
> GUI utilities. Do you have further documentation on how it
> affects command line stuff now?

Oh, well then maybe I'm wrong.

I'd never noticed that checkbox under previous versions of OSX.

This page seems to be the relevant one for 10.4 --

<http://docs.info.apple.com/article.html?path=Mac/10.4/en/mh609.html>

-- but it doesn't really clarify things one way or the other. :-/


-- 
Chris Devers


Re: Net::FTP on Tiger

2005-06-03 Thread Chris Devers
On Fri, 3 Jun 2005, Morbus Iff wrote:

> If you disable the firewall, I'm presuming they'll work?
>
> I don't remember the exact variable, but I *think* that adding
> PASSIVE_FTP=1 to your shell's startup should fix things up.

That's the old fix, and it probably still works, but you should be able
to get the same results in the OS itself now.

Quoting from the Firewall sub-panel of the Sharing panel in System
Preferences...

To use FTP to retrieve files while the firewall is on, enable
passive FTP mode using the Proxies tab in Network Preferences.

If you go into the Network panel and show your main interface, then
click on the Proxies tab, there will be a prominent checkbox:

[ ] Use Passive FTP Mode (PASV)

Checking that should be equivalent to the old $PASSIVE_FTP variable, but
should apply to all programs, graphical, command line, or self-made.


-- 
Chris Devers


Re: ModPerl on Tiger

2005-05-18 Thread Chris Devers
On Wed, 18 May 2005, Rich Morin wrote:

> Does anyone know whether (a) ModPerl is already part of Tiger?

Yes. Just as it has been with every version of OSX.

And for once, the stock Perl is in line with the current stable release!

Unlike with Panther, where you had to do weird output buffering tricks
in httpd.conf to get mod_perl to work, everything works fine in Tiger.

(Though I've yet to try installing RT, that'll be the real test. I was
never able to get it to work right on Panther...)


...was there supposed to be a (b) in there somewhere?


-- 
Chris Devers


Re: command-line tweaking of "Open With..." settings?

2005-04-23 Thread Chris Devers
On Sat, 23 Apr 2005, Rich Morin wrote:

> Clues? Suggestions?

It's a lateral approach to the problem, but RCDefaultApp may be able to 
help you: <http://www.rubicode.com/Software/RCDefaultApp/>

The core of RCDefaultApp is `lstool`, which you can invoke directly:

  $ /Volumes/RCDefaultApp-1.2.1/RCDefaultApp.prefPane/Contents/Resources/lstool 
  Usage:

  lstool read [ []]  
  lstool write   

   is one of: internet, url, extension, mime, ostype

   is the path to an application or a name to be looked up
  $

I suspect that this can be used to do what you need. Somehow...




-- 
Chris Devers


Re: "Tiger" version

2005-04-12 Thread Chris Devers
On Tue, 12 Apr 2005, Stephan Hochhaus wrote:

> Are you looking for this?
> http://www.apple.com/opensource/

That's the one!

Looks like it'll be Perl 5.8.6 then...



-- 
Chris Devers


Re: "Tiger" version

2005-04-12 Thread Chris Devers
On Tue, 12 Apr 2005, Lola Lee wrote:

> I've been looking at http://www.apple.com/macosx/developertools/ and 
> unfortunately it doesn't say which Perl version.  Surely this tidbit 
> is buried elsewhere on the site?

It would be nice if that page had version numbers for some of the main 
Unix software they're going to be distributing: Perl, Python, Ruby, GCC, 
etc. Now that a release date is imminent, maybe they can update the page 
to have this information.

Didn't the promo pages for 10.3 have all of this kind of thing?


-- 
Chris Devers


Re: "Tiger" version

2005-04-11 Thread Chris Devers
On Mon, 11 Apr 2005, Joseph Alotta wrote:

> Does anyone know when Tiger itself will be shipping?

The rumor sites all seem to think some time this month, but the people 
that actually know aren't speaking up one way or another. 

Chances aren't bad that they'll use one of these events:

<http://seminars.apple.com/tradeshows/>

But really, no one (that is allowed to say) knows yet.

Your best bet is to just keep an eye on tech news sites. The release of 
Tiger will surely be a headline on CNet, Slashdot, etc, and maybe even 
non-tech-specific sites like CNN or the BBC.


-- 
Chris Devers


Re: GUI for Perl

2005-03-21 Thread Chris Devers
On Sun, 20 Mar 2005, David Linton wrote:

> What's the least I need to know and where should I start to look for 
> info? e.g. FAQ, example scripts

Camelbones: <http://camelbones.sourceforge.net/index.php> 



-- 
Chris Devers  [EMAIL PROTECTED]
http://devers.homeip.net:8080/blog/

np: 'I've Got The World On A String'
 by Frank Sinatra
 from 'Classic Sinatra: His Great Performances 1953-1960'


Re: ANN: ShuX 3.0-beta1

2005-03-18 Thread Chris Devers
On Fri, 18 Mar 2005, Lola Lee wrote:

> Sherm Pendley wrote:
> 
> > That's likely to be the case. Try this:
> > 
> > defaults write org.dot-app.CamelBones perl /usr/bin/perl5.8.1
> > 
> 
> Tried this, with path modified to use the directory that 5.8.6 is 
> installed into - didn't work.

Based on the mail Sherm sent under a different subject, it sounds like 
this currently won't work, as ShuX only bundles support for Perl 5.8.1.

With that in mind, and assuming you still have the original file that 
Apple put at /usr/bin/perl5.8.1, can you use the line unamended?

 

-- 
Chris Devers


Re: ANN: ShuX 3.0-beta1

2005-03-18 Thread Chris Devers
On Fri, 18 Mar 2005, Lola Lee wrote:

> Ted Zeng wrote:
> > It works for me. But I don't know what it is for. I can open Perl 
> > POD with it. Is this what ShuX for? I could not find any doc. for 
> > it.
> 
> Well, it doesn't seem to be working for me.  I click on it and nothing 
> happens.  Maybe it's because I'm not using Apple's default install?  
> I'm using 10.3.8.  I have perl 5.8.6 installed into 
> /usr/local/lib/perl5/5.8.6 directory.
 
So follow the instructions from an earlier message in the thread:

defaults write org.dot-app.CamelBones perl /usr/local/lib/perl5/5.8.6 

It sounds like that will fix it.



-- 
Chris Devers


Re: [OT?] libxml2/libxslt and OSX

2005-03-17 Thread Chris Devers
On Thu, 17 Mar 2005, wren argetlahm wrote:

> This is only somewhat off topic, but I was wondering if there were any 
> packages out there for Mac OS X with the necessary development C 
> headers for libxml2 and libxslt? I can only seem to find rpms of the 
> same. If not (brace yourselves) how difficult would they be to 
> create*?

The system should already have the libxml2 libraries, but you get both 
the libraries and headers if you install XCode. (You get, among other 
things, /usr/lib/libxml2.{2.dylib,la} and /usr/include/libxml2/* files.)

For libxslt, it may compile cleanly on its own, but personally I just 
get it from Fink, which is a port of the Debian APT/dpkg toolkit. With 
Fink, an `apt-get install libxslt libxslt-bin libxslt-shlibs` should 
download and install .debs that have been patched & compiled for OSX.

Incidently, RPM probably won't help much on OSX. I'm not aware of any 
porting framework that uses it. Aside from Fink, the other main one, 
GNU/Darwin, is (ironically?) based on the BSD ports system. I've not 
heard of anyone porting over the RedHat porting framework to OSX.
 

-- 
Chris Devers


Re: problem with installing DBD::mysql

2005-03-15 Thread Chris Devers
On Wed, 16 Mar 2005, John Horner wrote:

> Call me petty, but this problem has been around for *years*, hasn't it?

Well, since 15 Oct 2003, as noted in the URL that I forgot to paste last 
time: <http://www.mail-archive.com/macosx%40perl.org/msg05736.html>

That's when Panther came out, not Jaguar.

Apparently, for whatever reason, it was never considered necessary to 
patch it in a following OS upgrade, or even in the XCode update that 
came out a few months ago. I don't know why, but there it is.

Panther was on the market longer than the previous OSX releases, but 
it's not *quite* such an old bug -- it only impacts 10.3. 

On the other hand, we still have Jaguar users today. Not many, but a 
few. We'll probably have people using Panther, and hitting this bug,
for at least a couple more years... :-/
 

-- 
Chris Devers


Re: problem with installing DBD::mysql

2005-03-15 Thread Chris Devers
On Tue, 15 Mar 2005, Mark Wheeler wrote:

> I don't know if this will help, but here is a link that I found to a 
> problem with installing DBD::mysql on Panther. Let me know if it 
> works/is helpful, as I need to install it, too. I did the research for 
> installing it (that's how I found the link) but haven't got around to 
> it yet. Here's the link:
> 
> http://www.truerwords.net/articles/osx/install_dbd_mysql.html
> 
> Let me know if this is the fix.
 
No. No. No.

It's close, but it's not the right fix.

But that page actually *links* to the right fix!

As Edward Moy (of Apple) wrote, you have to do the following:

   We recently discovered the DBD::mysql problem as well. The patch is 
   to edit /System/Library/Perl/5.8.1/darwin-thread-multi-2level/Config.pm, 
   replacing:

  
   ld='MACOSX_DEPLOYMENT_TARGET=10.3 cc'

  
   with

  
   ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc'

Do that, and DBD::Mysql (and anything else that trips over this bug) 
will work just fine.

 
 

-- 
Chris Devers


Re: perl.h?

2005-03-14 Thread Chris Devers
On Mon, 14 Mar 2005, Warren Pollans wrote:

> I just got an error - complaining about not being able to find perl.h. 
> Does that come with the xcode tools?  Or something else?

Yes, I seem to remember that header files come with XCode. 

If you want to install any Perl modules with a compiled XS component, 
you need the XCode toolkit anyway, so you might as well install it if 
you haven't done so already.
 

-- 
Chris Devers


Re: First CGI Setup

2005-03-11 Thread Chris Devers
On Sat, 12 Mar 2005, Joel Rees wrote:

> (One of these days I'm going to get version control running to my 
> liking, and I'll keep everything under /etc in version control. For 
> now, I just make a copy to work on and rename the old one *_nnn.bak or 
> something, keeping track of the editing sequence in the _nnn portion.)

Try this:

$ cat ~/bin/stamp
#!/bin/bash
#
# stamp is a utility which makes a backup of a conf file

[ $# -ne 1 ] && echo "usage: `basename $0` filename" && exit 100

old="$1"
new="$1.`date +%Y%m%d`.$$"

[ ! -f $old ] && echo "$old does not exist" && exit 100

cp $old $new

status=$?

[ -x $new ] && chmod -x $new

exit $status
$

It's crude, but it works well enough.

$ cd /etc/httpd
$ sudo stamp httpd.conf
  # I get a file like "httpd.conf.20050311.15629".
$ vim httpd.conf && apachectl configtest
  # I make a royal mess of things. Damn.
$ cp httpd.conf.20050311.15629 httpd.conf
$ apachectl configtest
  # All is right with the world again.

Something like CVS / SVN / BitKeeper would be "better", but not easier.
 


-- 
Chris Devers


Re: First CGI Setup

2005-03-10 Thread Chris Devers
On Thu, 10 Mar 2005, Ted Zeng wrote:

> Thanks. I turned it on by following your advice.

There was more to it than that though.

Merely turning it on by uncommenting the LoadModule and AddModule 
statements adds the functionality to Apache, but unless you also have 
directives that take advantage of it, it will sit there, silent & inert.

So, you also need one or more blocks of directives that use mod_perl; 
the details will vary depending on your goals, but here's a simple block 
that will allow you to rename most Perl .cgi or .pl scripts to run under 
the Apache::Registry mod_perl module if you rename them to *.mpl :

  
  PerlHeaderParserHandler "sub { tie *STDOUT, 'Apache' unless tied *STDOUT; 
 }"
  PerlHandler  Apache::Registry
  
  PerlRequire  /etc/httpd/startup.pl
  SetHandler   perl-script
  Options  +ExecCGI
  
  

Most people prefer to put all CGI / mod_perl scripts in one directory, 
but I prefer handling them by file extension, the way Windows or OSX 
would do. A more conventional approach might look like this instead:

  
  PerlHeaderParserHandler "sub { tie *STDOUT, 'Apache' unless tied *STDOUT; 
 }"
  PerlHandler  Apache::Registry
  Alias /perl/ "/Library/WebServer/Perl/"
  
  PerlRequire  /etc/httpd/startup.pl
  SetHandler   perl-script
  Options  +ExecCGI
  
  

Hopefully this gets the idea across.

Note that both of these refer to /etc/httpd/startup.pl. This script just 
preloads modules when Apache is launched, so that their contents are 
alreaddy available in memory when page hits start coming in. My copy of 
this file is pretty simple:

#!/usr/bin/perl -w

# lifted from the eagle book, pages 28 & 29

BEGIN {
use Apache ();
use lib qw( /sw/lib/perl5 );
tie *STDOUT, 'Apache';
}

use Apache::Registry ();
use Apache::Constants();
use CGI qw(-compile:all);
use CGI::Carp ();

use Apache::DBI();
use Apache::MP3::Sorted();

1;

Modules you use a lot can be addded here to improve performance, but 
adding too much can slow all accesses down. Balance accordingly.

Hopefully, the package you're setting up -- AxKit in this case -- will 
have instructions for what it needs to have added to your httpd.conf in 
order to meet its mod_perl needs.



-- 
Chris Devers


Re: First CGI Setup

2005-03-10 Thread Chris Devers
On Thu, 10 Mar 2005, Ted Zeng wrote:

> It looks like I will need mod_perl. mod_perl makes me nervous. Last 
> time I touched it, I could not make it work on Windows. The worst 
> experience I had with Apache on Windows. Now, I just realized that I 
> might need it because Axkit depends on it. Randal said that it is 
> installed in OS X. I hope this is the case. I will do some search on 
> this.

There's little to research.

If you look in /etc/httpd/httpd.conf, you should see these lines, mixed 
in with the other LoadModule and AddModule statements:

#LoadModule perl_modulelibexec/httpd/libperl.so

#AddModule mod_perl.c

Uncomment them and you now have a mod_perl enabled Apache:

LoadModule perl_modulelibexec/httpd/libperl.so

AddModule mod_perl.c

The mod_perl on OSX is, for the most part, exactly the same as it is on 
other versions of Unix: it can be flaky & fiddly, and there's a lot to 
learn, but getting up & running with it on Unix (including OSX) is a 
*lot* less painful than it would be on the Windows version of Apache.

Or at least, that has been my experience. 


-- 
Chris Devers


Re: What Perl editor do you recommend?

2005-03-02 Thread Chris Devers
[mangled quotation style revised :-) c.d.]

On Wed, 2 Mar 2005, Joseph Alotta wrote:

> On Mar 2, 2005, at 5:20 PM, Ted Zeng wrote:
> 
> > I have downloaded TextWrangler and used it for a short while. It 
> > satisfies all my need right now. In fact, I feel it is better than 
> > the shareware I used to use for editing Perl scripts on Windows. 
> > TextWrangler is free from Bare Bone Software, which also sells 
> > BBEdit.

TextWrangler seems to be a very good editor, and if you grow out of it, 
BBEdit will be there waiting for you as a superset of TW. 

It's also worth taking a look at SubEthaEdit though, if only for the 
extremely clever & useful collaborative editing feature that allows 
multiple SEE users to work on the same document at the same time. 

The people working on the document can discover each other automatically 
if you're on the same local network, or you can connect to remote users 
over the internet if you have their address. As an example, I've used 
SEE to edit a shared document from home and at work at the same time 
(with help from VNC) or asynchronously (to work on the file at work, 
then pick up where I was when I get home).

This isn't a capbility I'm aware of in any other editor, on any 
platform, and it's pretty much the only thing that would ever make me 
want to switch away from usign Vim as my main text editor. If you're 
collaborating on documents with other OSX users, this can be a great way 
to assist that. At my job, we've got half a dozen OSX users that have 
switched away from BBEdit to SEE just so they can collaborate this way, 
and they've been really happy with for the past few months.

> It seems to me, that vi and vim are very similiar.  I actually thought 
> they were the same.  What is the difference?

Vi was a very early full-screen UNIX editor going back to the 70s or so. 
Vi today is basically the same program it wass 20 or more years ago.

Vim is "Vi IMproved", a completely new program that both implements all 
the functionality of classic Vi while extending it with lots of features 
that came along later with editors like Emacs: multiple levels of undo, 
command history in the ex subshell, etc. Plus, it includes an optional 
graphical mode that runs natively on X11, Windows, and OSX; it doesn't 
make Vim as simple to use as TextWrangler / BBEdit / SubEthaEdit / etc, 
but it's a lot more friendly than the original Vi ever was...
 

-- 
Chris Devers


Re: could not build a module

2005-02-24 Thread Chris Devers
On Thu, 24 Feb 2005, David H. Adler wrote:

> Perhaps I'm mistaken, but wouldn't it be more accurate to say "install 
> the OS X development tools", rather than Xcode, per se?

As of OSX 10.3, "Xcode" is the name for the whole suite, in addition to 
the specific XCode IDE.

Maybe it was decided that the 10.0 - 10.2 era  "[Month] [Year] OSX 
Develeoper's Tools" was a clumsy name that had to be retired, and that 
having the same name for two things was acceptably annoying.

*shrug*
 

-- 
Chris Devers


Re: Heredoc

2005-02-18 Thread Chris Devers
On Fri, 18 Feb 2005, Jeremy Mates wrote:

> Warning! The qq[] syntax produces different output than the heredoc:
> 
> my $foo = < asdf
> EOD
> 
> my $bar = qq[
> asdf
> ];
> 
> print "uh oh" unless $foo eq $bar;

Right. The qq[] syntax above & as I offered earlier, tacks on newlines. 

These are identical:

  $ cat ptest
  #!/usr/bin/perl

  my $foo = <

Re: Heredoc

2005-02-18 Thread Chris Devers
On Fri, 18 Feb 2005, Jeremy Mates wrote:

> * Christopher L. Filkins <[EMAIL PROTECTED]>
> > I'm looking for the perl equivalent of a heredoc declaration.  For some
> > reason I can't recall how.  In php it would work like this:
> 
> my $foo = < 
>  Stuff stuff stuff
> 
> EOD

I've never quite understood the appeal of this construct, except among 
Perl-hackers-that-are-reformed-Shell-hackers.

Isn't something like this much clearer & easier?

  my $foo = qq[

  Stuff stuff stuff

  ];

  my $bar = q{

  Thingy thingy thingy! [Really!]

  };

  print qq(

  So first foo said "$foo"

  And then bar said: $bar

  );

Doesn't that look so much easier than heredoc syntax? You can pick 
whatever quot delimiters work best for the output of the moment, you 
don't have to keep track of the fiddly <

Re: Can't get DBD::mysql installed

2005-02-17 Thread Chris Devers
On Wed, 16 Feb 2005, DPH wrote:

> I think it's saying to update apache 2. It's difficult to get mod_perl 
> and apache 2 to play, that's why the module version is still 1.99. I 
> ignored this warning from others and wasted a lot of time, I had to go 
> back to 1.33 on the apache in the end.

This fits with what I've heard.
 
> On Feb 16, 2005, at 6:34 AM, Forbes, Donny wrote:
> 
> > Chris,
> > 
> > Not so much of a mysql problem. Basically I need to know how to upgrade
> > the mod_perl.
> > 
> > Here is what I did:
> > 
> > I am running apache version:
> > Server version: Apache/2.0.46
> 
> The current version shipping with Panther 10.3.7 id 2.0.52

This isn't true for Panther client version:

$ httpd -v
Server version: Apache/1.3.33 (Darwin)
Server built:   Nov 29 2004 17:59:31
$ sw_vers 
ProductName:Mac OS X
ProductVersion: 10.3.8
BuildVersion:   7U16
$

Panther server may ship with Apache 2, but the regular version doesn't.


-- 
Chris Devers


RE: Can't get DBD::mysql installed

2005-02-16 Thread Chris Devers
On Wed, 16 Feb 2005, Forbes, Donny wrote:

> Chris,

Why did you write to me ?

Your message needs to go to the relevant mailing list. I'm on the MacOSX 
Perl list, but not (currently) mod_perl. If this is a Mac question, I & 
others can help you on that list; if it's a mod_perl question -- and 
based on your pathnames, this doesn't look like OSX -- then you need to 
ask the people on that list. 

My mod_perl-foo is *really* musty, and I haven't touched mod_perl under 
Apache 2 at all yet, so your best bet is try asking others... :-)
 


-- 
Chris Devers


Re: Can't get DBD::mysql installed

2005-02-16 Thread Chris Devers
On Wed, 16 Feb 2005, Boysenberry Payne wrote:

> On Feb 15, 2005, at 1:09 PM, Chris Devers wrote:
> 
> > ld='MACOSX_DEPLOYMENT_TARGET=10.3 cc'
> 
> Thanks for the patch/fix.  Do you think I should rebuild DBD::mysql?
 
It certainly wouldn't hurt, and it would only take a few minutes. 

It's worth doing. 
 

-- 
Chris Devers


Re: Can't get DBD::mysql installed

2005-02-15 Thread Chris Devers
On Tue, 15 Feb 2005, Boysenberry Payne wrote:

>   It seems as though it's installed regardless...

But the errors may still exist; it's good to correct, or at least fully 
understand, any `make test` errors you come across.

This page has the correct fix for the DBD::Mysql problem:

  <http://www.mail-archive.com/macosx%40perl.org/msg05736.html>

The fix, in full, is as follows:

  We recently discovered the DBD::mysql problem as well. The patch is to 
  edit /System/Library/Perl/5.8.1/darwin-thread-multi-2level/Config.pm, 
  replacing:

ld='MACOSX_DEPLOYMENT_TARGET=10.3 cc'

  with

ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc'

  Unfortunately, this change is too late to get into Panther.

The instructions at <http://www.truerwords.net/3556> patch the symptom, 
but not the underlying problem; other module instals could have the same 
problem. It's better to address what's really causing this error.


(Not that this is a mod_perl issue either, but oh well.)



-- 
Chris Devers


RE: Perl stopped working on Apache 1.3.3, but then starts?

2005-02-08 Thread Chris Devers
On Tue, 8 Feb 2005, InnoTech Support wrote:

> Did not see any errors in Apache error log, nor anything in web log. Today,
> all is well, seems to be working fine. 
> 
> Yesterday, we were pushing much more traffic than usual out. It appears as
> if Apache was too busy dealing with web requests, and could not process cgi
> requests until traffic subsided. Perhaps Perl/cgi requests are lower
> priority?

Who knows?

I think your best bet, if the problem appears to have vanished, is to 
look over the Apache logs for the time frame that the problem was 
happening to see if there is any record of what the problem may have 
been. You may or may not see any useful patterns, but it sounds like 
that's the only data you have to work with now. 



-- 
Chris Devers


Re: Perl stopped working on Apache 1.3.3, but then starts?

2005-02-08 Thread Chris Devers
On Mon, 7 Feb 2005, InnoTech Support wrote:

> I had a situation where I had to cycle power to my G5 Mac running Apache
> 1.3.3 OS X 10.3.7 today. After reboot, I found that Perl scripts no longer
> reliably run via the web. I can get pages to load a few times, but then I
> get the Internal error page, but do not see any errors in apache error log.
> I tested via Terminal calling a Perl script and it seemed to work fine.

What shows up in the Apache logs when someone hits this page?

Do successes & errors look the same in the log?



-- 
Chris Devers


installation weirdness with Mac::Glue

2005-01-14 Thread Chris Devers
I thought I'd play around with Mac::Glue, so I fired up the CPAN shell 
to install it. The installation went, in part, like this:

[...]
Manifying blib/man3/Mac::AETE::Format::Glue.3pm
Manifying blib/man3/Mac::AETE::Dialect.3pm
Manifying blib/man3/Mac::AETE::Parser.3pm
Manifying blib/man3/Mac::Glue.3pm
Manifying blib/man3/Mac::AETE::App.3pm
Created and installed Dialect glue for AppleScript.rsrc (AppleScript)

At this point, things seemed to go haywire. The perl process was taking 
up the bulk of CPU time, the virtual memory consumption for that process 
was well over a gigabyte and growing, the system was almost completely 
unresponsive, and it was staying that way for 20 minutes or more.

I've never seen a CPAN installation do this sort of thing before.

Thinking something had gone off the rails, I did a `clean Mac::Glue`, 
then tried it again. The installation did the same thing at the same 
point, so I decided to just let it run while I watched television. The 
computer sat there making all kinds of painful noises for the next hour 
and a half before it settled down; when I came back to check, the 
following text was on the console:

Manifying blib/man3/Mac::AETE::Format::Glue.3pm
Manifying blib/man3/Mac::AETE::Dialect.3pm
Manifying blib/man3/Mac::AETE::Parser.3pm
Manifying blib/man3/Mac::Glue.3pm
Manifying blib/man3/Mac::AETE::App.3pm
Created and installed Dialect glue for AppleScript.rsrc (AppleScript)
*** malloc: vm_allocate(size=268435456) failed (error code=3)
*** malloc[8585]: error: Can't allocate region
Out of memory!
*** malloc: vm_allocate(size=268435456) failed (error code=3)
*** malloc[8585]: error: Can't allocate region
Out of memory!
END failed--call queue aborted,  line 1.
*** malloc: vm_allocate(size=268435456) failed (error code=3)
*** malloc[10104]: error: Can't allocate region
Out of memory!
*** malloc: vm_allocate(size=268435456) failed (error code=3)
*** malloc[10104]: error: Can't allocate region
Out of memory!
END failed--call queue aborted.
  /usr/bin/make -j3 -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" 
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/gluePlease run gluedialect and gluescriptadds programs at 
/Users/cdevers/.cpan/build/Mac-Glue-1.22/blib/lib/Mac/Glue.pm line 1341,  
line 1.
t/glueok
 
t/pod.ok
 
All tests successful.
Files=2, Tests=11,  6 wallclock secs ( 1.11 cusr +  0.30 csys =  1.41 CPU)
  /usr/bin/make test -- OK
Running make install
Appending installation info to 
///System/Library/Perl/5.8.1/darwin-thread-multi-2level/perllocal.pod
Installing /Library/Perl/5.8.1/Mac/Glue.pm
Installing /Library/Perl/5.8.1/Mac/Glue/Common.pm
Installing /Library/Perl/5.8.1/Mac/Glue/glues/dialects/AppleScript
Installing /Library/Perl/5.8.1/Mac/Glue/glues/dialects/AppleScript.pod
Installing /man/man3/Mac::AETE::App.3pm
Installing /man/man3/Mac::AETE::Dialect.3pm
Installing /man/man3/Mac::AETE::Format::Glue.3pm
Installing /man/man3/Mac::AETE::Parser.3pm
Installing /man/man3/Mac::Glue.3pm
Writing 
///Library/Perl/5.8.1/darwin-thread-multi-2level/auto/Mac/Glue/.packlist
  /usr/bin/make install -j3 -- OK

cpan> 

So... in spite of some nasty looking errors, the installation made it to 
the tests, and they appear to have all passed cleanly. 

Is this trustworthy?

This is a dual G5/1.8ghz running the stock version of Perl. In detail:

% hostinfo
Mach kernel version:
 Darwin Kernel Version 7.7.0:
Sun Nov  7 16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC
Kernel configured for up to 2 processors.
2 processors are physically available.
Processor type: ppc970 (PowerPC 970)
Processors active: 0 1
Primary memory available: 1024.00 megabytes.
Default processor set: 158 tasks, 316 threads, 2 processors
Load average: 0.06, Mach factor: 1.93

% sw_vers
ProductName:Mac OS X
ProductVersion: 10.3.7
BuildVersion:   7S215

% uname -a
Darwin macgarnicle 7.7.0 Darwin Kernel Version 7.7.0: Sun Nov  7 
16:06:51 PST 2004; root:xnu/xnu-517.9.5.obj~1/RELEASE_PPC  Power 
Macintosh powerpc

% perl -v | grep -i 'this is perl'
This is perl, v5.8.1-RC3 built for darwin-thread-multi-2level

Any ideas? Are installations like this normal for Mac::Glue?



-- 
Chris Devers


Re: catnip.local (redirect)

2005-01-06 Thread Chris Devers
On Thu, 6 Jan 2005, Jeff Lowrey wrote:

> I might actually look at the apache configuration, and see if it's 
> using ServerName=catnip.local, and fix that.

This sounds like the right solution to me. 

>From what I can tell, if the ServerName directive is undefined in the 
Apache configuration, then it will default to the host name, which the 
Mac is going to see as `hostname`.local. If she manually specifies --

ServerName catnip.company.com

-- in /etc/httpd/httpd.conf, then restarts Apache with a --

   $ sudo apachectl configtest && sudo apachectl restart

-- then everything should begin working properly.

Mucking around with the hosts file is the wrong way to fix this. For one 
thing, Panther doesn't even necessarily pay attention to it (by default 
it ignores it and most other files in /etc, if I remember right), but 
more importantly you're fixing the symptom (redirecting the host name) 
rather than the real problem (apache should use a portable name). Fix 
the real problem and the symptom will go away.


-- 
Chris Devers


Re: Trying to Install Bundle::DBD::mysql

2004-12-20 Thread Chris Devers
On Mon, 20 Dec 2004, Sherm Pendley wrote:

> No, it doesn't matter what user you use to grant the privileges. If 
> 'mysqluser' is your normal admin user, just log in to the mysql shell 
> as that user:
> 
> mysql -u mysqluser -p
> 
> For that matter, you could use phpMyAdmin to grant the privileges too. 
> The important part is that the user '[EMAIL PROTECTED]' needs full access 
> to the database 'test' - how you grant it that access is incidental.

To clarify, '[EMAIL PROTECTED]' is an account with the MySQL database.

It has no relation at all to the system 'root' account on your computer.

MySQL has its own set of accounts which generally have no connection to 
the ones on the system that the database server is running on. 

 

-- 
Chris Devers


Re: MOD_PERL and OSX

2004-11-11 Thread Chris Devers
Is it okay if we keep this conversation on the list?

On Thu, 11 Nov 2004, Mark S Lowe wrote:

> Ha! Well, I found that solution suggested on a site a couple weeks 
> ago, and added it to my mod_perl httpd.conf. Still, the good old 
> fashion
> 
> Print ³content-type: text/html\n\n²;
> Print ³hello world\n²;
> 
> Wouldn¹t work. So I have to use the CGI method of
> 
> Header(³text/html²);
> $r->print(³hello world²);
> 
> Having read a ton more about mod_perl, they suggest I use the latter 
> to gain the best performance boost. I¹m guessing I can remove this TIE 
> code and just follow the rules better.
> 
> =)

Ahh, I see. Weird, but if it works...

 

-- 
Chris Devers

Re: MOD_PERL and OSX

2004-11-11 Thread Chris Devers
On Thu, 11 Nov 2004, Mark S Lowe wrote:

> Thank you for your help! I added this module directive and still had 
> the piping problem with output unless I use the CGI module, but since 
> mod_perl perfers I do this, that is what I¹ll use. Thanks again!

Wait, I'm confused -- did this or did this not fix the problem? You make 
it sound like it didn't work, but you're using it anyway (unless I'm 
just being thick, which is possible, as it's been a long day...).


-- 
Chris Devers

Re: MOD_PERL and OSX

2004-11-09 Thread Chris Devers
On Tue, 9 Nov 2004, Mark S Lowe wrote:

> It would seem after many attempts to get anything of any level of 
> complexity running in mod_perl under OSX, that perhaps it can¹t be 
> done. I have libraries that work fine in the normal cgi-bin, but 
> constantly produce 500 server errors when running from my mod_perl 
> mod-cgi bin. I can get little hello worlds running fine, but the 
> second I try to access various built-in libraries, just the ³use² 
> statement cases fatal errors.

Adding this line to your httpd.conf may help you:

  PerlHeaderParserHandler "sub { tie *STDOUT, 'Apache' unless tied *STDOUT; }"

Details: <http://devers.homeip.net:8080/blog/archives/64.html>
 
This seems to have fixed the problems I was having getting some mod_perl 
applications (Apache::MP3, etc) to work.



-- 
Chris Devers

Re: Perl/Tk ???

2004-11-09 Thread Chris Devers
On Tue, 9 Nov 2004, Robert wrote:

> Does Tk work under OSX? I moved from the Windows world and was hoping 
> I didn't have to leave that nicety behind.

As noted by another poster, you can always use the X11 version, but 
there's also a native-Aqua version that works fairly well:

<http://www.apple.com/downloads/macosx/unix_open_source/tcltkaqua.html>
<http://tcltkaqua.sourceforge.net/> 

It's not great, but it works reasonably well, and is probably on par 
with versions of Tk for Windows. 

Alternatively, if you want "native" OSX GUI apps in Perl, take a look at 
the CamelBones project:

<http://camelbones.sourceforge.net/>




-- 
Chris Devers


Re: Getting started with Perl OSX

2004-11-01 Thread Chris Devers
On Mon, 1 Nov 2004, Albert Kaltenbaeck wrote:

> Are there any good books on Perl for OSX?
> 
> Lots of books on Perl but OSX Specifically?

>From this point of view, OSX is just Unix, so any Perl book that assumes 
you're working with Unix -- which will be about all of the ones that 
don't explicitly mention Windows or win32 -- will be appropriate.

MacPerl was a different thing, like Win32 Perl, but now that OS9 is 
going, that's kind of a dead end. Perl on OSX is just standard Perl, the 
same as it is on Linux, Solaris, BSD, etc. 

With that in mind, you may want to look at a good Unix book that 
includes documentation about OSX. _Unix Power Tools_ is an excellent 
book, and I seem to remember the current edition having a Perl section 
(though I may be wrong about that), and I know it specifically talks 
about OSX in places. 


-- 
Chris Devers


Re: [OT] Text Editor for OSX

2004-10-04 Thread Chris Devers
On Mon, 4 Oct 2004, wren argetlahm wrote:
And, I mean I could use vim, it has pretty good highlighting 
abilities, but it'd be nice to get something good and Mac-ish.
Maybe I should have clarified that Emacs and Vim came, unbidden, to 
mind, because both of them already have nice GUI Mac versions.

I happen to prefer Vim, and use that as my main editor in most cases, 
but a case could be made that Emacs is already pretty "Mac-ish", in that 
a lot of Cocoa applications support Emacs keybindings to begin with. Try 
it out in, say, a text box in Safari: ^a jumps to the start of a line, 
^e jumps to the end, ^d deletes the character to the right, ^h deletes 
the character to the left, etc. As I understand it, anything written 
using the Cocoa libraries gets this for free, and it will be immediately 
familiar to anyone that knows Emacs (or readline, bash, pine, etc).

Plus, if you come up with useful extensions to these editors, they will 
be useful to people on other operating systems, so you automatically get 
a larger pool of people who can take your ideas, run with them, and send 
any improvements they can come up with back to you.

As for whether Vim or Emacs can handle different regions of a file in 
different ways, I've never looked for that feature, but there may be 
discussion of it in the vim-users list, or [insert Emacs equivalent 
mailing list here], or other documentation for those editors. If the 
functionality doesn't exist, I'm sure it's something that would be 
useful to lots of people...

--
Chris Devers


Re: [OT] Text Editor for OSX

2004-10-03 Thread Chris Devers
On Sun, 3 Oct 2004, wren argetlahm wrote:
I apologize in advance for the off-topic nature of this posting. I've 
recently been lamenting the shortcomings of my current text editor for 
my purposes (SubEthaEdit since my copy of BBEdit is Classic and a new 
one costs way to much for my budget). I did a quick google search to 
try and find out what other options are out there, particularly in the 
F/OSS realm and with good support for XML/HTML/etc. And I couldn't 
find anything in particular. So, in my infinite (lack of) wisdom I've 
decided that it might be good to write my own.
Yes, that's what the world needs: Yet Another Text Editor.
:-)
I can think of two reasons why it would make any sense to take on the 
task of writing Yet Another Text Editor:

 1. You want to learn Cocoa programming. That alone is a good reason.
 2. You have some brilliant new feature in mind that can't really be 
incorporated into existing software as a plugin (e.g. the network 
support that SubEthaEdit provides, which doesn't seem to exist anywhere 
else). This is a good idea if you really have something novel in mind, 
but there's a lot of mediocre editors out there if not.

Short of those, wouldn't it make more sense to take an existing editor 
that has already been ported to OSX -- Emacs & Vim spring, unbidden, to 
mind here -- and learn how to extend this editor to meet your needs?

Really, there isn't much that either of Emacs or Vim can't do if you 
spend the time learning them. Plus, the source for both is available, so 
you can get them to do what you want -- and Vim, at least, supports Perl 
as a plugin language (along with Python et al).

But please don't let me talk you out of it if this is something you 
really want to do. I just think the most productive approach would be to 
build on top of an existing & reasonably complete editor rather than 
starting everything from scratch...


--
Chris Devers


Re: Thunderbird

2004-09-24 Thread Chris Devers
On Thu, 23 Sep 2004, wren argetlahm wrote:

> Incidentally, the .vcf file generated by AB looks akin
> to your example but with a space between every
> charecter and two newlines instead of one. Is that
> normal, or might that be part of the reason that
> Firebird is having difficulty reading it?

It looks like it's using DOS line endings: \r\n

That may be required by the spec, I don't know...


-- 
Chris Devers


Re: Thunderbird

2004-09-23 Thread Chris Devers
On Fri, 24 Sep 2004, Joel Rees wrote:

> I don't know about .vcf, but .csv is fairly easy to just look at with 
> a text editor (formatting off, of course).

VCF is (basically) an ascii format. You can encode binary data (e.g. 
photos) in it, but it's base64 encoded (just like email) so you can poke 
at it with a regular text editor. 

A typical entry might look something like this:

BEGIN:VCARD
VERSION:3.0
N:Meyer;Russ;;;
FN:Russ Meyer
EMAIL;type=INTERNET;type=HOME;type=pref:[EMAIL PROTECTED]
item1.EMAIL;type=INTERNET:[EMAIL PROTECTED]
item1.X-ABLabel:_$!!$_
TEL;type=HOME;type=pref:800 555.1212
item2.ADR;type=HOME;type=pref:;;42 Any Lane
\n;Hollywood;CA;12345;United States
item2.X-ABADR:us
X-AIM;type=HOME;type=pref:rmvix
END:VCARD

Etc. It's a little confusing, but it's mostly a regular format that 
isn't too hard to read or otherwise work with.

> (One of these days, we have to put ASCII behind us, but that's a topic for a
> rainy weekend or two.)

???

Every tool has a role; ascii has lots and lots and lots of useful ones. 
Also roles that it's totally wrong for, but that doesn't mean that it 
makes sense to get rid of it altogether...

 

-- 
Chris Devers


Re: ImageMagick/PerlMagick on Panther

2004-09-23 Thread Chris Devers
On Thu, 23 Sep 2004, Mark Wheeler wrote:

> When I tried to
> install perlmagick, it gave me an error, could not find cc or gcc.

Ahh, ok, that is something that needs to be addressed (and would have to 
be addressed no matter how you're getting your software, unless you luck 
out and there are binaries available, as there were for ImageMagick).

As you figured out, you need the developer tools, or XCode, as 10.3 now 
calls them. If you are running the OS that came with your Mac, the 
installer may be in /Applications/Installers, but if you re-installed or 
upgraded then you'll probably have to look elsewhere. 

You may have a CD with the 1.0 or 1.1 version that came with your Mac or 
your copy of OSX. If so, that's the fastest approach, since if you have 
to download it the file is hundreds of megabytes. That version would do 
for your purposes, but if you want to get up to date, there should be a 
download for 1.5 that doesn't require you to upgrade from an older one, 
so that would be the faster option in that case.

Note also that if you're still running 10.2/Jaguar, I'm not sure if you 
can use XCode. As far as I know, XCode is only for 10.3/Panther. 

Once XCode / devtools are installed, you should end up with a copy of 
GCC and related tools in /usr/bin/gcc, /usr/bin/make, etc. Once you've 
got all that, then go back and try building perlmagick-581 with Fink. 
This time around, it should work just fine. 

Let us know if you have any problems :-)


-- 
Chris Devers


Re: ImageMagick/PerlMagick on Panther

2004-09-23 Thread Chris Devers
On Thu, 23 Sep 2004, Ingo Weiss wrote:

> I installed Fink after unsuccessfully trying to install Image::Magick
> using CPAN a couple of days ago. Fink is installing imagemagick as I
> write this. I was kind of hoping that this, and then installing
> Image::Magick using CPAN again, would actually get me 100% of the way...
>
> Chris, what do the remaining 10% involve?

It might, I just wasn't sure if I was forgetting a step afterwards.

The main one I can think of is that Fink is going to put the libraries 
it installs under /sw/lib, so you have to make sure that these are in 
your @INC path. The Fink installer should set this up for you, but you 
can double-check by doing this:

% perl -e 'print join( "\n", @INC)'
/sw/lib/perl5/5.8.1/darwin-thread-multi-2level
/sw/lib/perl5/5.8.1
/sw/lib/perl5
/sw/lib/perl5/darwin
/System/Library/Perl/5.8.1/darwin-thread-multi-2level
/System/Library/Perl/5.8.1
/Library/Perl/5.8.1/darwin-thread-multi-2level
/Library/Perl/5.8.1
/Library/Perl
/Network/Library/Perl/5.8.1/darwin-thread-multi-2level
/Network/Library/Perl/5.8.1
/Network/Library/Perl
.
%

If what you get isn't roughly the same, then you may have to include a 
`use lib ...` statement in your scripts to tell them where to look for 
the Image::Magick library.

But hopefully this Just Works.

 

-- 
Chris Devers


Re: ImageMagick/PerlMagick on Panther

2004-09-23 Thread Chris Devers
On Thu, 23 Sep 2004, Mark Wheeler wrote:

> Ok, I installed fink, no problems.
> 
> I used $ sudo apt-get install imagemagick and installed imagemagick - no
> problems.
> 
> I then used $ sudo apt-get install perlmagick-pm581 and got an error,
> "couldn't find package perlmagick-pm581", so I'm guessing that is didn't
> install because fink couldn't find anything to install.

It meant that there isn't a binary available. That's okay, we can just 
build it from source instead:

% fink --help
Fink 0.22.2

Usage: fink [options] command [package...]
   fink install pkg1 [pkg2 ...]

[... etc, snipped. run it yourself to see the options ...]

% fink list | grep -i magick
 imagemagick[virtual package]
 imagemagick-dev[virtual package]
 imagemagick-shlibs [virtual package]
 i  imagemagick 6.0.8-1 Image manipulation tools
imagemagick-dev 6.0.8-1 Image manipulation tools
imagemagick-nox 6.0.8-1 Image manipulation tools
imagemagick-nox-dev 6.0.8-1 Image manipulation tools
imagemagick-nox-shlibs  6.0.8-1 Image manipulation tools
 i  imagemagick-shlibs  6.0.8-1 Image manipulation tools
perlmagick-pm5815.5.6-11Perl interface to ImageMagick
% sudo fink install perlmagick-pm581

Please consider looking over the documentation for the tools that are 
being suggested before coming back to the list at every speed bump that 
you hit :-)


> So I'm a little at a loss. Do I need to update the installation of ImageMagick
> to 6.0.6 then install PerlMagick 6.02 after that?

Stop. Turn around. You were almost there. Finish the way you started.

You've almost got it, and if you had tried `fink --help` or `man fink`, 
you may well have been able to figure out the rest on your own.

 

-- 
Chris Devers


Re: ImageMagick/PerlMagick on Panther

2004-09-22 Thread Chris Devers
On Wed, 22 Sep 2004, Mark Wheeler wrote:

> Ok... it seems to me that my two best options are as follows:
> 
> 1. Install fink and then install ImagaMagick (as per below)
> 2. Install PerlMagick
> 3. Install the addition C libraries so as to have access to image manipulation
> and compression and such

The third step automatically happens as a subset of the first here.

It can be done as a oneliner:

fink install imagemagic perlmagick-pm581

(Though, of course, installing Fink is a separate step :-)

> 1. Install the Darwin port of ImageMagick.

I guess so; I know almost nothing about the Darwinports project. (I seem 
to remember rumors about them replacing system commands like make & gcc, 
so I was scared off from using it, but that may not actually be true.)

> So with that being said, I guess the next question would be about the Darwin
> port. How is that an advantage over fink (et al)? I know of darwin but don't
> know anything about it. And finally, which would be the probable best route to
> take -- fink or darwin?

Darwin is the kernel & base operating system for OSX -- if you're using 
Perl on a Mac, you're using Darwin. Darwinports, on the other hand, is a 
project that uses BSD tools to port Unix software to OSX, just as the 
Fink project uses Debian Linux tools to port the same software. 

I say use Fink, but it's subjective -- others will have perfectly valid 
reasons for preferring Darwinports. I just happen to know & use Debian 
far more often than I've ever used *BSD, so I'm more comfortable working 
with that set of tools (apt-get, dpkg, etc). YMMV.

In any case, stop agonizing over it, pick one -- you can't really go 
wrong either way -- and install the software you want & get going. 

You're getting hung up on the least interesting part of programming! :-)



-- 
Chris Devers


Re: ImageMagick/PerlMagick on Panther

2004-09-22 Thread Chris Devers
On Wed, 22 Sep 2004, Sherm Pendley wrote:

> On Sep 22, 2004, at 4:13 PM, Chris Devers wrote:
> 
> > If you really want to prove to yourself how much rounder your wheel will
> > be, then yes, use the Unix instructions.
> 
> Or, if you want to see how that wheel got so round. I'm all for
> self-improvement! My only concern in this particular instance is that Mark
> says it his first module install. Image::Magick might be a little too hairy
> for a first attempt.

...and that is precisely why I'm urging him to cheat & use Fink.

Something smaller, then fine, build it by hand, but this is an awful 
module to learn with...

> The CPAN shell helps a great deal for those modules that don't need 
> special configuration options, environment variables, etc. Some 
> modules *do* need such things though, so it's important to familiarize 
> yourself with the manual process, even if you use the automated shell 
> 99% of the time.

No argument here. 

I just think we're at a point that the automated tools like Fink and the 
CPAN shell are good enough that the "average" learner should turn to 
them first -- if only to get started far more quickly with the much more 
interesting task of writing new software -- and then come back and play 
with installing things by hand later.

It's good to know how the build process works, and how to tweak it, but 
it can also be a very frustrating time sink, and it wouldn't surprise me 
at all if it was enough to scare away new learners.


-- 
Chris Devers


Re: ImageMagick/PerlMagick on Panther

2004-09-22 Thread Chris Devers
On Wed, 22 Sep 2004, Mark Wheeler wrote:

> There are instructions for installing ImageMagic on the ImageMagick site.

Swell.

As I was saying though, if you install Fink, you can take advantage of 
the fact that someone already automated all of this for you. 

But hey, some people like re-inventing wheels... :-)

> Should I just follow the Unix instructions?

If you really want to prove to yourself how much rounder your wheel will 
be, then yes, use the Unix instructions.

> Am I going in the right direction here, or is there something else 
> (Imager?) that will do the same thing with less of an installation 
> procedure?

ImageMagick is a big, complex package to start with, but it can also do 
a huge number of things, and there are quite a lot of people using it. 
You may be able to do just fine with a simpler library
 
> Just had a thought. Is installing a C library a different process then
> installing a perl module?

Lots of Perl modules are written partly in C (or XS, whatever), so in 
some ways there isn't much of a difference. But more broadly, yeah, a 
pure C library is often installed in ways similar to Perl libraries.
 

Really though, I'm not kidding, don't bother with this. It Hurts.

Download Fink from <http://fink.sf.net/>. 

Install it.

Follow the instructions for setting it up.

Launch a new shell, and just type

$ sudo apt-get install imagemagick

If a binary is available -- I seem to remember that it is -- then Fink 
will download both Imagemagick and any libraries it depends on, and will 
install everything for you. 

If the binary isn't available, skip apt-get & build it from source:

$ sudo fink -y install imagemagick

At that point, all you have to do is hook Perl up to it by installing 
the Image::Magick CPAN module. Again, Fink will help you here.

$ sudo apt-get install perlmagick-pm581

or, once more, build from source, with

$ sudo fink -y install perlmagick-pm581

Plant, water, watch it grow, harvest when ripe.



You can do this all by hand, but there's not much point in doing so.



-- 
Chris Devers


Re: ImageMagick/PerlMagick on Panther

2004-09-22 Thread Chris Devers
On Wed, 22 Sep 2004, Sherm Pendley wrote:

> On Sep 22, 2004, at 2:11 PM, william ross wrote:
> 
> > any chance at all of making it work you must first install fink
> 
> Nonsense. You must first install the C libraries you need. Fink is *one* way
> to get them, not the only one.

It's certainly a very easy & painless way though:

  % sudo fink -y install imagemagick
  % sudo perl -MCPAN -e 'install Image::Magick'

This gets you 90% of the way there, at least.

The ability to do this by hand can obviously be valuable, but it can 
hardly be easier :-)



-- 
Chris Devers


Re: Thunderbird

2004-09-21 Thread Chris Devers
On Tue, 21 Sep 2004, wren argetlahm wrote:

> Any other suggestions? 

It may not be the smallest solution, but Palm Desktop may be an 
effective intermediary. The program is a free download, and among other 
things it can able to import & export several address file formats.

 

-- 
Chris Devers


Re: 10.3.5 - mod_perl upgrade trouble

2004-09-20 Thread Chris Devers
On Mon, 20 Sep 2004, Andrew Brosnan wrote:

> However, even though it appears that mod_perl is loaded, I can't get
> mod_perl scripts to run. 

This had been driving me nuts for months, and I finally figured it out 
this weekend. I posted a message a while back about Apache::MP3 not 
working, but wasn't able to find a fix at the time -- now it works, too.

A fuller description is on my web site (see below), but basically, for 
reasons I'm not clear on, mod_perl isn't grabbing stdout from scripts, 
which means they go through the motions of working, normal activity 
shows up in the access log (and nothing in the error log), but nothing 
ever shows up in the browser.

The interesting test is to telnet to the web port of your server and 
manually request a mod_perl controlled document:

 -> $ telnet localhost 80
Trying 127.0.0.1...
Connected to my-tester
Escape character is '^]'.
 -> GET /perl/test HTTP/1.0
 ->
$

Or something like that -- no data at all comes back.

The fix is to tie STDOUT to Apache in your script --

tie *STDOUT, 'Apache';

-- or do the same in your httpd.conf --

PerlHeaderParserHandler "sub { tie *STDOUT, 'Apache' unless tied *STDOUT; }"

I'm still not clear what, exactly, the bug is that is causing this 
(simply a bad build that got shipped?), but in any event the mechanism 
makes sense, and the way to fix it is clear.

Give that a try & let me know if it doesn't work.


This ought to be in a prominent Perl/OSX10.3 FAQ somewhere... :-/


Longer version of the above, with links & references, etc:

<http://devers.homeip.net:8080/blog/archives/64.html>



-- 
Chris Devers


Re: Net::SSH::Perl

2004-09-14 Thread Chris Devers
On Tue, 14 Sep 2004, The Ghost wrote:

> I can't get Math::Pari (dependency for Net::SSH::Perl) to build 
> on OS X 10.3.5.  Suggestions?
 
Try harder ?

Send error messages along with questions you expect real answers for ?



-- 
Chris Devers


Re: mount ftp network disk

2004-09-10 Thread Chris Devers
On Fri, 10 Sep 2004, Joseph Alotta wrote:
 $ mkdir /tmp/debian
$ mount_ftp ftp://ftp.us.debian.org/debian/ /tmp/debian/
$ ls -la /tmp/debian/
Thanks Chris and Peter for the help.
I couldn't get this to work on ftp-www.earthlink.net.   I think it is a login 
id problem.  mount_ftp uses the same login id that you have on the mac which 
in my case is not my email.
Have you tried embedding the login in the URI ?
$ mount_ftp ftp://user:[EMAIL PROTECTED] /Local/path
It seems like that ought to work ...
If this is a dead end & you're looking for a better approach, ncftp is 
also nice...

--
Chris Devers


Re: BBEdit 8.0

2004-09-10 Thread Chris Devers
Seeing as this has devolved into an editor love-fest, rather than curse 
the darkness and that weird gas odor, I'll light a candle & brighten 
things a bit more. (Or mangle metaphors, or something. I'll stop now.)

I've been putting a copy of SubEthaEdit on all the Macs at work for a 
while now, but none of them seemed to use it until recently -- they were 
all just using BBEdit. But then someone noticed the networking abilities 
in SEE, and they've quickly started using it for collaborating on 
documents, interacting with people elsewhere in the office or over the 
internet, or even as a weird, hyperactive chat framework.

I don't know of any other editor, on any platform, that can do the 
clever networking tricks that SubEthaEdit provides. You can have an 
arbitrary number of users simultaneously making multiple edits to a 
document with an indepentend insertion point into that document for each 
user, and everything happens live as everyone types. This can obviously 
get pretty chaotic, but as long as people follow a little bit of decorum 
(don't carelessly mess with each other's edits) then it isn't too bad.

In theory it should be possible to get other editors hooked into the 
protocol that SEE uses, so that "real" editors like Vim, Emacs, and 
BBEdit can participate, but for now and for the foreseeable future, this 
capability is only available in SEE. That alone makes it worth using.

Aside from that, it's a solid but mostly standard editor. It does things 
like automatic syntax highlighting and preservation of indent level 
(i.e. it will carry over from the previous line, but doesn't seem to 
have magic for increasing or decreasing at block boundaries); it can 
provide a web formatted version of HTML code; it provides regex search & 
replace capabilities; and it has some kind of support for managing 
changes to a document, though I haven't played with this feature.

Learn more here: <http://www.codingmonkeys.de/subethaedit/>
--
Chris Devers


Re: mount ftp network disk

2004-09-09 Thread Chris Devers
On Fri, 10 Sep 2004, Peter N Lewis wrote:
On Thu, 9 Sep 2004, Joseph Alotta wrote:
I want to back up my personal web pages that are on the earthlink server. 
I figure if I can mount them, then psync can do the rest.
Looks like this will work:
$ mkdir /tmp/debian
$ mount_ftp ftp://ftp.us.debian.org/debian/
That's kind of the hard way unless you really want to do it from the 
Terminal.
Right, be he implies that he's trying to script it, so it seemed like a 
two-word shell command was the approach he was looking for. Getting the 
Finder seems cumbersome in this context.

   * it seems like the Finder can't browse this directory
   * I can't figure out how to unmount it... :-)
Neither of these are an issue if the Finder mounts it.
Right, but again, I'm working on the assumption that he's trying to get 
this done with shell tools, not the GUI. If you can mount a filesystem 
by poking at a command line tool, intuitively it seems like it should be 
much less overhead than bringing in the Finder & AppleScript machinery.

BTW, one little catch is that it is read-only.
For backups, that's probably okay though.
--
Chris Devers  [EMAIL PROTECTED]
http://devers.homeip.net:8080/blog/
np: 'Bank Of Boston Beauty Queen'
 by The Dresden Dolls
 from 'A Is For Accident'


Re: mount ftp network disk

2004-09-09 Thread Chris Devers
On Thu, 9 Sep 2004, Joseph Alotta wrote:
I want to back up my personal web pages that are on the earthlink server.  I 
figure if I can mount them, then psync can do the rest.
Looks like this will work:
$ mkdir /tmp/debian
$ mount_ftp ftp://ftp.us.debian.org/debian/
/tmp/debian/
$ ls -la /tmp/debian/
total 25979
dr-xr-xr-x1 cdevers  unknown   512 Sep  9 14:08 .
drwxrwxrwt   41 root wheel1394 Sep  9 14:08 ..
-rw---1 cdevers  unknown   943 Nov 20  2003 README
-rw---1 cdevers  unknown  1290 Dec  4  2000 README.CD-manufacture
-rw---1 cdevers  unknown  2677 Jul 24  2003 README.html
-rw---1 cdevers  unknown 76978 May 26 18:52 README.mirrors.html
-rw---1 cdevers  unknown 38599 May 26 18:52 README.mirrors.txt
-rw---1 cdevers  unknown 23336 May 26 18:52 README.non-US
lrwx--1 cdevers  unknown13 Apr  6 23:58 README.pgp -> README.non-US
drwx--1 cdevers  unknown  4096 Nov 20  2003 dists
drwx--1 cdevers  unknown  4096 Sep  8 18:52 doc
drwx--1 cdevers  unknown  4096 Sep  8 19:36 indices
-rw---1 cdevers  unknown  23462655 Sep  8 19:37 ls-lR
-rw---1 cdevers  unknown   2709576 Sep  8 19:37 ls-lR.gz
-rw---1 cdevers  unknown271044 Sep  8 19:37 ls-lR.patch.gz
drwx--1 cdevers  unknown46 Dec 19  2000 pool
drwx--1 cdevers  unknown79 Mar 26  2002 project
drwx--1 cdevers  unknown  4096 Sep 12  2002 tools
$ df -Th /tmp/debian/
FilesystemTypeSize  Used Avail Use% Mounted on
ftp://ftp.us.debian.org/debian/
   nfs1.0G  1.0G 0 100% /tmp/debian/
$
Neat-o, I'd never thought of trying that before...
The only catches seem to be that:
* it seems like the Finder can't browse this directory -- I
  get an error about having to wait for the resource to become
  available -- but everything seems to work just fine, and very
  responsively, on the command line.
   * I can't figure out how to unmount it... :-)
Aside from that little wrinkle, this seems to work well...

--
Chris Devers


Re: Upgrading from 10.1 to 10.2

2004-08-31 Thread Chris Devers
On Tue, 31 Aug 2004, Sherm Pendley wrote:
Really though, you should be wiping the drive and doing a "clean" 
install of the newer OS anyway. That's what most folks recommend as 
the safest way to upgrade. You'll need to spend some additional time 
re-installing Perl modules, the apps you use, etc., but it's time well 
spent.
I don't get this advice -- I've never had a problem in just doing the 
plain old upgrade installs.

It can't hurt (much) to wipe everything out, I guess, but it seems so 
close to the painful "Windows needs to be reformatted every 3 months" 
chestnut -- there may be an element of truth in there, but if the system 
has been maintained well, that's really overkill.

*shrug*

--
Chris Devers  [EMAIL PROTECTED]
http://devers.homeip.net:8080/blog/
np: 'Movin' Right Along (lo-fi midi version)'
 by The Muppets
 from 'The Muppet Movie Soundtrack'


Re: Upgrading from 10.1 to 10.2

2004-08-31 Thread Chris Devers
On Wed, 1 Sep 2004, John Horner wrote:
Am I going to have any Perl major problems if I upgrade to Jaguar? I'm 
just wary of that stuff about there being different versions of Perl 
and different versions of modules and so on.
If I remember right, Apple shipped Perl 5.6.1 with OSX 10.0 through 
10.2, so you should be pretty safe in this case.

--
Chris Devers  [EMAIL PROTECTED]
http://devers.homeip.net:8080/blog/
np: 'Mahna Mahna!'
 by The Muppets
 from 'The Muppet Show'


Re: Brand New Empty Mac

2004-08-25 Thread Chris Devers
On Wed, 25 Aug 2004, John Horner wrote:
[D]o you partition your hard-drives? Do you have the system on one 
partition and documents on another and so on?
No. I did that with my first Macs, but always regretted it. Just leave 
it as one volume -- there's very little to gain by partitioning it.

Any issues around the installation of Perl and other things like C 
libraries that I should be thinking about?
<http://www.mail-archive.com/macosx%40perl.org/msg05736.html>
Quoting the relevant bit there --
There's an unpatched bug with the system Perl that prevents
some modules (notably DBD::mysql) from building properly.
ld='MACOSX_DEPLOYMENT_TARGET=10.3 cc'
with
ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc'
Other than that, things should Just Work.

--
Chris Devers  [EMAIL PROTECTED]
http://devers.homeip.net:8080/blog/
np: 'Hill Street Blues'
 from 'Television Theme Songs'


Re: Download images/movies

2004-08-24 Thread Chris Devers
On Tue, 24 Aug 2004, Andy Turner wrote:
I would agree that slurping the entire file is a bad idea.
This whole project is, in hindsight, a bad idea.
This can be done more safely & easily in the Apache config.
Assume that the image tree lives in /Library/WebServer/Documents/photos, 
and is ordinarily accessible at the url <http://site/photos/>.

Do this in your shell:
ln -s /Library/WebServer/Documents/photos{,-dl}
Do this in your httpd.conf:
Alias /photo-dl /Library/WebServer/Documents/photos-dl

AddType application/octet-stream .jpg

Restart Apache.
fin.
The image tree will now be available for regular browsing at 
<http://site/photos/> as before, but also for downloading at 
<http://site/photo-dl/>.

No mucking around with whitelists.
No risk of nasty path ../foo tricks.
It should Just Work.
And if it doesn't, your script wouldn't have either :-)

--
Chris Devers  [EMAIL PROTECTED]
http://devers.homeip.net:8080/blog/
np: 'Il Buono, Il Brutto, Il Cattivo - Titoli Di Testa'
 by Ennio Morricone
 from 'Le Colonne Sonore Originali Dei Film Di Sergio Leone'


Re: Download images/movies

2004-08-23 Thread Chris Devers
On Mon, 23 Aug 2004, william ross wrote:
On 23 Aug 2004, at 12:14, Chris Devers wrote:
On Mon, 23 Aug 2004, william ross wrote:

This will mean that jpegs in that directory can't ever be used on pages
-- which would kind of ruin the fun.
There seems to be an easy workaround though: symlink ~/Sites/images 
(or whatever it is) to something like ~/Sites/downloads (or similar), 
and then you automatically get a clone of the directory tree.
That is nice. Or similarly with two similar virtualhosts: 
download.something.com the same as www.something.com but with the 
mime-types twisted out of shape. but yours is cleaner.
Right.
And either way, this should sidestep most of the security issues that 
the scripts & path whitelisting approach delved into at length in this 
thread. If you just symlink it, and treat the two branches differently, 
then the problem should just magically go away.

Not to say that some clever thought hasn't been going into that part of 
the thread, but I do think this sidesteps the problem nicely... :-)

--
Chris Devers  [EMAIL PROTECTED]
http://devers.homeip.net:8080/blog/
np: 'The Greatest Phone Message of All Time'
 by Jonathan Goldstein
 from 'This American Life: Crimebusters and Crossed Wires'


Re: Download images/movies

2004-08-23 Thread Chris Devers
On Mon, 23 Aug 2004, william ross wrote:
No need. On apache, at least, you can change the mime-type in an 
.htaccess file. Assuming the AllowOverride settings permit it, which 
they normally would:

AddType application/octet-stream jpg
should do it.
Ok, that's much more clever than I was thinking of, but the Achillies 
heel is that --

This will mean that jpegs in that directory can't ever be used on 
pages
-- which would kind of ruin the fun.
There seems to be an easy workaround though: symlink ~/Sites/images (or 
whatever it is) to something like ~/Sites/downloads (or similar), and 
then you automatically get a clone of the directory tree.

From there, the image gallery application can be set up to serve things 
like
  

  
and then all people would have to do to save a file would be click it.
This is much better than what I was thinking earlier! :-)

--
Chris Devers  [EMAIL PROTECTED]
http://devers.homeip.net:8080/blog/
np: 'Star/Pointro'
 by The Roots
 from 'The Tipping Point'


Re: Download images/movies

2004-08-21 Thread Chris Devers
On Sat, 21 Aug 2004, Mark Wheeler wrote:
I have a picture gallery I building for my family. When a movie or 
picture is displayed, I want them to be able to save it. But... if I 
just provide a link in the coding to the actual file, it will open up 
in the browser window and be displayed. Is there a way to have 
download, either automatically or by a "Save As..." dialog box, the 
file rather then displaying it? I hope that was clear. :)
This is untested, but I'm guessing that you could write a simple CGI 
script that takes the URL for an image as an argument -- maybe just 
using $ENV{'HTTP_QUERY_STRING'} so that the url can be simple like --

http://site/images/fetch.pl?path/to/image/file.jpg
-- and then have your script find "path/to/image/file.jpg" and spool it 
back to the client with a Content-type of "application/octet-stream" 
instead of "image/jpeg".

This can probably be done with about half a dozen lines of code, and if 
the browser is well behaved -- that'll be the part that's a pain to 
verify -- the alternate content type should force the right behavior.

Let me know if you find this description unclear...
--
Chris Devers  [EMAIL PROTECTED]
http://devers.homeip.net:8080/blog/
np: 'Ham 'n' Eggs'
 by A Tribe Called Quest
 from 'People's Instinctive Travels And Paths Of Rhythm'


Re: List::Util

2004-08-06 Thread Chris Devers
On Fri, 6 Aug 2004, Julianno Sambatti wrote:
How do I incorporate the List::Util module into the perl library with 
OSX? I mean I have no idea what to download and where to save the file 
I downloaded.
It should already be installed, I think.
Try this command:
perl -MList::Util -e '1'
If it produces no output, you already have it.
If you get an error about it not being available, run these commands:
bash
export FTP_PASSSIVE=1
sudo perl -MCPAN 'install List::Util'
You will probably be asked a series of questions from that last one; in 
most cases the defaults are fine. Once the questions are done, it should
find, download, and install the module for you.

The Perl beginners list is the right place for these sorts of questions: 
<[EMAIL PROTECTED]> or <http://learn.perl.org/>


--
Chris Devers


Re: Apache::MP3 no worky

2004-08-03 Thread Chris Devers
On Tue, 3 Aug 2004, Chris Nandor wrote:
$ sw_vers
ProductName:Mac OS X Server
Hmm, I wonder if the fact that I'm using OSX client is relevant...
$ pmvers Apache::MP3 MP3::Info
Apache::MP3: 3.03
MP3::Info: 1.02
Strange, I don't have a `pmvers` on my computer. But I do have...
  $ grep '$VERSION = ' /Library/Perl/5.8.1/{Apache/MP3,MP3/Info}.pm
  /Library/Perl/5.8.1/Apache/MP3.pm:$VERSION = '3.01';
  /Library/Perl/5.8.1/MP3/Info.pm:$VERSION = '1.02';
So, same versions here.
$ which httpd
/usr/sbin/httpd
$ httpd -v
Server version: Apache/1.3.29 (Darwin)
Server built:   Feb  4 2004 10:31:58
  $ which httpd
  /usr/sbin/httpd
  $ httpd -v
  Server version: Apache/1.3.29 (Darwin)
  Server built:   Feb  4 2004 10:31:58
(That is, it's the default Apache, default perl, default mod_perl, etc.
Everything is default, and Apache::MP3 is the latest.)
Right -- all of that applies to me as well.
So the only big difference appears to be that you're running OSX Server.
Hmm...
Any idea how I could coax Apache / A:M into producing more diagnostics? 
I tried adjusting Apache's loglevel setting but it didn't appear to 
change anything in this context -- I still just get no output, normal 
access logs, and no recorded activity in the error log.

Weird.
--
Chris Devers


Apache::MP3 no worky

2004-08-03 Thread Chris Devers
Out of curiosity, does anyone have Apache::MP3 working on Panther?
I have it working just fine on a Debian machine at work, but it doesn't 
work at all on a Mac there, nor does it work on my Mac at home. In both 
cases, it just serves zero-length, null-content pages to all requests.

Nothing shows up in the Apache error log, and the access log shows the 
same sort of activity that the working Linux machine shows.

The Apache config on the Mac appears to be identical in every important 
way to the config on the Linux PC, save for adjusted path names.

I could get into specifics of how I have things configured, and would be 
happy to respond to such questions if you have any, but I really think 
there's just some sort of underlying bug on the Mac side that is short 
circuiting the application such that it does nothing. I've poked around 
on the interweb a bit and have found some people complaining about the 
same symptoms on their Macs, but no one seems to have any explanations.

Basic system info:
$ hostinfo
Mach kernel version:
 Darwin Kernel Version 7.4.0:
Wed May 12 16:58:24 PDT 2004; root:xnu/xnu-517.7.7.obj~7/RELEASE_PPC
Kernel configured for up to 2 processors.
2 processors are physically available.
Processor type: ppc970 (PowerPC 970)
Processors active: 0 1
Primary memory available: 1024.00 megabytes.
Default processor set: 152 tasks, 303 threads, 2 processors
Load average: 1.32, Mach factor: 0.67
$ sw_vers
ProductName:Mac OS X
ProductVersion: 10.3.4
BuildVersion:   7H63
$ which perl
/usr/bin/perl
$ perl -v|grep 'This is perl'
This is perl, v5.8.1-RC3 built for darwin-thread-multi-2level
The other machine I'm trying to run it on has the same config for 
everything except the hostinfo command; in that case, it's --

$ hostinfo
Mach kernel version:
 Darwin Kernel Version 7.4.0:
Wed May 12 16:58:24 PDT 2004; root:xnu/xnu-517.7.7.obj~7/RELEASE_PPC
Kernel configured for a single processor only.
1 processor is physically available.
Processor type: ppc7450 (PowerPC 7450)
Processor active: 0
Primary memory available: 1024.00 megabytes.
Default processor set: 115 tasks, 239 threads, 1 processors
Load average: 2.37, Mach factor: 0.28
As I say, more info is available on requst.
So -- anyone have Apache::MP3 working on Panther?

--
Chris Devers


Re: Incorrect Path or format?

2004-07-27 Thread Chris Devers
On Tue, 27 Jul 2004, Nick Pappas wrote:
Thanks for the responses - so many and so quickly.
The easy questions tend to get more responses :-)
I'm sure I'll be back with more. I am working my way up to writing a 
program that will read and store temperature information from some 
external sensors.
Unless what you're doing is OSX specific -- which would be cool, as the 
project sounds interesting, but my guess is that it's more generic than 
that -- then the Perl Beginners list might be the right place for this.

Basic information on the list is available at <http://learn.perl.org/>; 
there's a subscription box on the top-right side of the page. There's 
also a FAQ for the list at <http://learn.perl.org/beginners-faq>.

Good luck with your project :-)
--
Chris Devers


  1   2   3   4   >