Re: Perl/Tk on OS X

2002-09-26 Thread Jerry LeVan

I have built Perl/Tk for:

  MacOS X 10.1.5 and Perl 5.6.1  and
  MacOS X 10.2.1 and Perl 5.8.0

I followed the instructions found at:
http://www.lehigh.edu/~sol0/Macintosh/X/ptk/

Could you be a bit more specific as to how your build failed?

(Be careful, *don't* try the dyld replacement trick if you
Are running 10.2)

--Jerry

 Has anyone gotten this to build. I've searched extensively. Tried the
 hacked dyld/optimizer trick found on the lehigh.edu site - all to no
 avail. XDarwin works great, perl does too. Npw I want to bring them
 together. I bought my iBook with the intention of being able to use it
 for cross-platform shell and perl scripting, and would love to be able
 to work with perl/tk. Can anyone point me in the right direction to get
 this built.
 
 Thanks,
 -Rich
 




dos2unix

2002-09-26 Thread Adriano Allora

hi to all!
I need to convert some dos files in unix files, are there commands I can 
use (like recode)?
thanks a lot,

adr




targeting a specific PID/path with an Apple Event, and 'v-string' warning

2002-09-26 Thread Rob Barris

Part 1 of 2:


This is Perl-related only in that I'm trying to do it from a Perl 
script; it occurred to me that someone here might have seen how this is 
done.  (also posted on the applescript list at lists.apple.com...)


say I take an app and make two copies of it on the HD in distinct
folders.

I'd like to drive each copy with unique commands from an AppleScript,
possibly running both at the same time.  In this case the app is
CodeWarrior and I want to be able to run multiple instances on a dual
processor machine.

Could swear I have seen the syntax for doing this but searching the
list archives and the Apple web page has not found it yet.

Is it possible?


The best result would be if I could explicitly name the path to each 
app, launch them, get the PSN or PID for each instance, then be able to 
use those PIDs later on to selectively control one instance or the 
other, or both.  I'm trying to avoid hacking the creator code of the 
apps in question which is how one app is usually distinguished from 
another in AppleScript AFAICT.



Part 2 of 2:

I went through Apple's directions for installing Perl 5.8.0 and had 
no problems.
(http://developer.apple.com/internet/macosx/perl.html)

Then I went on to install Mac::AppleScript and 
Mac::AppleScript::Glue, they seem OK also.

This Perl script, while it runs and does seem to create the desired 
effect of controlling Finder, prints a warning on the command line when 
it runs.  I don't even have my Perl green belt yet so I am wondering 
if this is serious or if there is some adjustment I should make to the 
script, to placate it.

Script (as1.pl):

#!/usr/bin/perl

use Mac::AppleScript::Glue;

my $finder = new Mac::AppleScript::Glue::Application('Finder');

$finder-insertion_location-open;

Message:
[localhost:~] xbuilder% ./as1.pl
v-string in use/require non-portable at 
/Library/Perl/Mac/AppleScript/Glue.pm line 234.

What's a v-string ?  (ducks..)

Rob




Re: targeting a specific PID/path with an Apple Event, and 'v-string' warning

2002-09-26 Thread John Labovitz

On 9/26/02 10:49 AM, Rob Barris [EMAIL PROTECTED] wrote:

 Then I went on to install Mac::AppleScript and
 Mac::AppleScript::Glue, they seem OK also.

That's good to know (me being the author of Mac::AppleScript::Glue, and
*not* running 5.8).

 [localhost:~] xbuilder% ./as1.pl
 v-string in use/require non-portable at
 /Library/Perl/Mac/AppleScript/Glue.pm line 234.
 
 What's a v-string ?  (ducks..)

Oops.  Looks like that's my fault -- I think I'm using a screwy version
number for my require line in the script that ensures we're running with a
recent-enough version of Perl.

You can easily fix this by changing line 234 of
/Library/Perl/Mac/AppleScript/Glue.pm from this:

require 5.6.0;

to this:

require 5.6;

I'll update this for a 0.04 version of Mac::AppleScript::Glue.

-- 
John Labovitz
[EMAIL PROTECTED]
www.johnlabovitz.com




Re: 10.2, Perl 5.8.0 and GD-1.33

2002-09-26 Thread nellA hciR

got these instruction from Randall Cox
http://homepage.mac.com/xports/

Porter: Randal Cox
Status: Successful
How To: Slightly complicated install.
Become root. Decompress the archive, cd into it, then type
Edit Makefile.PL and make these changes
add -I/usr/include to the INC line,
add -L/usr/lib to the LIBPATH line
perl Makefile.PL(answer y, n, n)
make(bails with a ranlib error)
ranlib /usr/local/lib/*.a(update the static libraries)
make(works fine this time)
make test(no errors) # got some errors on iMac but all works???
make install

- hcir

 [SORRY IF THIS IS A REPEAT]

 I recently installed Perl 5.8.0 onto Mac 10.2
 I am using Fink to provide the GD 1.8.4-11 and freetype 1.3.1-6 
 libraries.
 I downloaded GD-1.33 and modified the Makefile.PL to include the /sw 
 libraries
 I did have GD installed this way with 5.6.0.

 I now getting this error.  Anyone have any ideas?  Below is output
 from the Makefile.pl and subsequent 'make'





Re: Woes of 5.8.0 and CamelBones

2002-09-26 Thread Dan Sugalski

At 5:08 PM -0400 9/26/02, Casey West wrote:
It was Wednesday, September 25, 2002 when Sherm Pendley took the 
soap box, saying:
: On Wednesday, September 25, 2002, at 03:51 PM, Casey West wrote:
:
: I've recompiled CamelBones for 5.8.0, which I installed over 5.6.0 in
: the default Apple locations.  When I compiled the framework I used
: Apples instructions for making it able to be included in
: applications.
:
: Sounds to me like the old framework got copied into your app, instead
: of your new one. Did you do one of the following?
:
: 1. Replace /Library/Frameworks/CamelBones.framework with your
: newly-built version.
: 2. Remove /Library/Frameworks/CamelBones.framework from your project,
: and add the newly-built version instead.

I've done both of these.  Then I started a brand new project and in
the Perl code I put 'use Text::CSV_XS' and as soon as I did the
program broke with the previously mentioned symbol errors.  Any non-XS
module usage and all is well.

I bet those XS modules are built with an older perl, or something 
went odd when building 5.8.0. Can you use them properly from the 
command line? (perl -MText::CSV_XS)
-- 
 Dan

--it's like this---
Dan Sugalski  even samurai
[EMAIL PROTECTED] have teddy bears and even
   teddy bears get drunk



Re: Woes of 5.8.0 and CamelBones

2002-09-26 Thread Sherm Pendley

On Thursday, September 26, 2002, at 05:08 PM, Casey West wrote:

 I started a brand new project and in
 the Perl code I put 'use Text::CSV_XS' and as soon as I did the
 program broke with the previously mentioned symbol errors.  Any non-XS
 module usage and all is well.

A version mismatch in the CB framework vs. the installed Perl results in 
dyld errors when your app is starting. What you're describing sounds a 
lot more like the Text::CSV_XS module is compiled against 5.6.0.

Did you recompile all of your XS modules after upgrading to 5.8.0? Does 
that include fink-installed modules found under /sw/lib/perl5/?

You can verify the version of Perl being used in your app with 
NSLog($^V);

sherm--




Re: Woes of 5.8.0 and CamelBones

2002-09-26 Thread Casey West

It was Thursday, September 26, 2002 when Dan Sugalski took the soap box, saying:
: At 5:08 PM -0400 9/26/02, Casey West wrote:
: It was Wednesday, September 25, 2002 when Sherm Pendley took the 
: soap box, saying:
: : On Wednesday, September 25, 2002, at 03:51 PM, Casey West wrote:
: :
: : I've recompiled CamelBones for 5.8.0, which I installed over 5.6.0 in
: : the default Apple locations.  When I compiled the framework I used
: : Apples instructions for making it able to be included in
: : applications.
: :
: : Sounds to me like the old framework got copied into your app, instead
: : of your new one. Did you do one of the following?
: :
: : 1. Replace /Library/Frameworks/CamelBones.framework with your
: : newly-built version.
: : 2. Remove /Library/Frameworks/CamelBones.framework from your project,
: : and add the newly-built version instead.
: 
: I've done both of these.  Then I started a brand new project and in
: the Perl code I put 'use Text::CSV_XS' and as soon as I did the
: program broke with the previously mentioned symbol errors.  Any non-XS
: module usage and all is well.
: 
: I bet those XS modules are built with an older perl, or something 
: went odd when building 5.8.0. Can you use them properly from the 
: command line? (perl -MText::CSV_XS)

That's what you'd like to think, I switched them while you weren't
looking!

I ran into this when I first intalled 5.8.0 and have since recompiled
all my modules.  Text::CSV_XS (as well as WWW::UsePerl::Journal which
is what I was using in my original and somewhere gets to using an XS
module) all work from the command line.

-- 
Casey West



Re: dos2unix

2002-09-26 Thread Ken Williams

Hmm - that script doesn't actually do anything, and you don't 
want to have to edit the script every time you want to convert a 
file.  A much shorter one-liner script will get the job done on 
the command line:

perl -pi -e tr/\r//d file1 file2 file3 ...

For this reason, I have the following in my ~/.login file:

alias mac2unix 'perl -pi -e tr/\r/\n/'
alias dos2unix 'perl -pi -e tr/\r//d'

  -Ken


On Friday, September 27, 2002, at 03:26  AM, Robin wrote:
 On Friday, September 27, 2002, at 01:57  am, Adriano Allora wrote:
 I need to convert some dos files in unix files, are there 
 commands I can use (like recode)?

 I'm assuming you mean text files and you need to convert line 
 endings. You'll need to edit the files array putting in the 
 full paths to the files you want to update, saving them to disk 
 I'll leave up to you ;-)

 ==cut below this text=
 #!/usr/bin/perl -w

 use strict;

 # Unix systems (Unix, Linux, OSX)  '\n' = ASCII '\012' ('\f' 
 line feed).
 # MacOS9 and earlier'\n' = ASCII '\015' 
 ('\r' carriage return).
 # MS-DOS,Windows systems   '\n' = ASCII '\012\015' 
 ('\f\r' line feed + carriage return).

 my($temp,files);
 files=(ADD YOUR FILE LIST HERE);

 for $temp(files){
   open (IN,$temp);
   
   while (IN) {
   tr/\015/\012/s ;# change Dos/Win/Mac line endings 
 to Unix/OSX ones  }
 }
 ==cut above this text=

 HTH

 Robin





Re: darwinports.....

2002-09-26 Thread Michael Maibaum

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On Thursday, Sep 26, 2002, at 17:21 US/Pacific, Ken Williams wrote:



 On Thursday, September 26, 2002, at 11:55  PM, Michael Maibaum wrote:
 and http://www.opendarwin.org/projects/darwinports


 I've submitted ports for Perl5.8, apache with static mod_perl 
 (including a version with joe's experimental libapreq stuff). Only 
 the simplest apache port has shown up in cvs yet...but the rest soon 
 I hope.


 Hmm - how is this different/better than fink?  All I see in the FAQ is 
 that it's sort of like fink.

I think it hopes to be more extensible than fink, in terms of embedding 
in other applications (though I know this has been done with fink, c.f. 
fink commander) and in terms of port variants. Also I think the 
dependancy tracking will ultimately be more flexible than that of fink.

Fink is cool, but I think Jordan is one of the few people with the 
experience (FreeBSD ports), and the skill (along with Landon and Kevin) 
to bring something even better to the table. We'll see.

Michael
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (Darwin)

iD8DBQE9k65/ilk3LUlIL0MRAgzDAKC3CN3/ZeQlDVCi8zR+VZv2oUSHDACcCaTP
AijNuY1pOWmzDCIK1ckoO0I=
=xeP9
-END PGP SIGNATURE-




Re: darwinports.....

2002-09-26 Thread Michael Maibaum

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On Thursday, Sep 26, 2002, at 18:17 US/Pacific, Ken Williams wrote:


 On Friday, September 27, 2002, at 11:03  AM, Michael Maibaum wrote:
 On Thursday, Sep 26, 2002, at 17:21 US/Pacific, Ken Williams wrote:
 On Thursday, September 26, 2002, at 11:55  PM, Michael Maibaum wrote:
 and http://www.opendarwin.org/projects/darwinports


 I've submitted ports for Perl5.8, apache with static mod_perl 
 (including a version with joe's experimental libapreq stuff). Only 
 the simplest apache port has shown up in cvs yet...but the rest 
 soon I hope.


 Hmm - how is this different/better than fink?  All I see in the FAQ 
 is that it's sort of like fink.

 I think it hopes to be more extensible than fink, in terms of 
 embedding in other applications (though I know this has been done 
 with fink, c.f. fink commander) and in terms of port variants. Also I 
 think the dependancy tracking will ultimately be more flexible than 
 that of fink.

 Fink is cool, but I think Jordan is one of the few people with the 
 experience (FreeBSD ports), and the skill (along with Landon and 
 Kevin) to bring something even better to the table. We'll see.


 Hmm - this does burst my happiness bubble quite badly to know that 
 there are parallel projects and that they're not able to directly 
 leverage each other's work.  IMO because it'll be better is never a 
 good enough reason to re-invent the wheel unless someone can also 
 explain why the previous work isn't fixable.

well, I'm certain that the darwinports will benefit from the previous 
porting projects experience. Jordan once wrote a rather persuasive 
email why FreeBSD ports needed redoing, make macros not being the most 
user-friendly/extensible/maintainable of systems.

As to why not fink, I'm not sure. Purely for me, I found fink tied me 
to tightly to what other people wanted (in terms of configuration etc), 
as do pretty much every other porting system (with the possible 
exception of Portage, which I haven't used yet). This is not to say I 
found fink bad, just I haven't found my prefect ports engine yet. 
Maybe this will be it, maybe not.

Michael

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (Darwin)

iD8DBQE9k7e6ilk3LUlIL0MRAo+eAJ4pgiI/DaiQ8bm34x+9GrX+PFXaygCggH5u
LQ8g7SBEB6QUoOVJJccTO8E=
=fE/e
-END PGP SIGNATURE-




Re: Perl/Tk on OS X

2002-09-26 Thread Rich Michaela

Whoops! Spoke too soon. This is weird. Built fine, the demos run well. However
if I try and create event the simplest perl/tk script, I get dyld errors and
it fails:

dyld: perl multiple definitions of symbol _LangExit
/Library/Perl/darwin/auto/Tk/Event/Event.bundle definition of _LangExit
/Library/Perl/darwin/auto/Tk/Tk.bundle definition of _LangExit

This reminds me of the errors that caused the original build to fail. There
seems to be some recursion through libraries, such that multiple libs try to
define the same thing. Any ideas?

TIA

Rich wrote:

 Jerry/brian

 Thanks both. I don't know why it worked this time. I thought I had followed
 all the instructions from the lehigh.edu site. Maybe it's just because I'm
 on 10.1.5 now instead of 10.1.2? In any event it worked this time and I'm a
 happy camper. Thanks.

 iBook 600MHz G3 384MB RAM
 MacOS X 10.1.5
 perl 5.6.1
 Tk-800.024




Re: Perl/Tk on OS X

2002-09-26 Thread Jerry LeVan

Are you sure that you are exporting DYLD_ALLOW_MULTISYMS?

--Jerry

 Whoops! Spoke too soon. This is weird. Built fine, the demos run well.
 However
 if I try and create event the simplest perl/tk script, I get dyld errors
 and
 it fails:
 
 dyld: perl multiple definitions of symbol _LangExit
 /Library/Perl/darwin/auto/Tk/Event/Event.bundle definition of _LangExit
 /Library/Perl/darwin/auto/Tk/Tk.bundle definition of _LangExit
 
 This reminds me of the errors that caused the original build to fail.
 There
 seems to be some recursion through libraries, such that multiple libs
 try to
 define the same thing. Any ideas?
 
 TIA
 
 Rich wrote:
 
 Jerry/brian
 
 Thanks both. I don't know why it worked this time. I thought I had
 followed
 all the instructions from the lehigh.edu site. Maybe it's just because
 I'm
 on 10.1.5 now instead of 10.1.2? In any event it worked this time and
 I'm a
 happy camper. Thanks.
 
 iBook 600MHz G3 384MB RAM
 MacOS X 10.1.5
 perl 5.6.1
 Tk-800.024
 




Re: Perl/Tk on OS X -- and another GD plea(se) :)

2002-09-26 Thread Ward W. Vuillemot

I finally got to Tk to load with 10.2 and Perl 5.8.0 by making sure the 
regex does not have the trailing \s+ in file MMUtil.pm  for the 
LDDLFLAGS.

To verify, I simply ran the POS sample found on Perl.com and it works 
without any glitches.

Now, if I can just get GD to installnone of the tricks online are 
working for me.  Anyone have an idea.

Cheers,
Ward




Re: Perl/Tk on OS X

2002-09-26 Thread Rich Michaela

That was it. I inadvertently grabbed another terminal session that didn't
have it defined. Thanks again.


Jerry LeVan wrote:

 Are you sure that you are exporting DYLD_ALLOW_MULTISYMS?

 --Jerry






Re: Perl/Tk on OS X

2002-09-26 Thread Ken Williams


On Thursday, September 26, 2002, at 02:10  PM, _brian_d_foy wrote:
 did you make sure to set the DYLD_ALLOW_MULTISYMS environment variable?

Oh!  I didn't know about that variable - it's probably what will 
fix Apache::{Request|Cookie} too.  Is it a new Jaguarism?

  -Ken