[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl-Modules] cpan-mac and Mac::Glue installation, err, quirks...



Greetings!

Ok, so I find out about Chris Nador's way cool Mac::Glue module and decide to install it.  Looks like the cpan-mac package is a dead-ringer for RedHat RPM's, so I decide to give that approach the first go.

I read every scrap of documentation I can.  Then I read it all again.  I download and install cpan-mac.  Everything goes according to plan, except for the end of the mirrors section where I get:

---
Select your country (or several nearby countries) [] 1 2
(1) ftp://cpan.topend.com.au/pub/CPAN/ (previous pick)
(2) ftp://ftp.labyrinth.net.au/pub/perl/CPAN/ (previous pick)
(3) ftp://ftp.sage-au.org.au/pub/compilers/perl/CPAN/ (previous pick)
(4) ftp://mirror.aarnet.edu.au/pub/perl/CPAN/ (previous pick)
(5) ftp://ftp.auckland.ac.nz/pub/perl/CPAN/ (previous pick)
(6) ftp://sunsite.net.nz/pub/languages/perl/CPAN/ (previous pick)
Select as many URLs as you like
(or just hit RETURN to keep your previous picks) [1 2 3 4 5 6] 1 2 3 4 5 6
Enter another URL or RETURN to quit: [] # Use of uninitialized value, <STDIN> chunk 49.
File '(eval 59)'; Line 26
New set of picks:
  ftp://cpan.topend.com.au/pub/CPAN/
  ftp://ftp.labyrinth.net.au/pub/perl/CPAN/
  ftp://ftp.sage-au.org.au/pub/compilers/perl/CPAN/
  ftp://mirror.aarnet.edu.au/pub/perl/CPAN/
  ftp://ftp.auckland.ac.nz/pub/perl/CPAN/
  ftp://sunsite.net.nz/pub/languages/perl/CPAN/
commit: wrote Phoenix:Applications:MacPerl 5.2.0r4:site_perl:CPAN:Config.pm
---

(Note that the above is a dump of the output after I ran "o conf init" to do it all a second time (just to make sure the first wasn't a fluke).  I used Control-D, by the way, because RETURN simply didn't work.)

Now I classify the use of an uninitialized variable to be a warning, not an error, so I plough on.  The only reason I mention it now is because it was the *only* problem I had with the cpan-mac install, and it might mean something to you guys.

I'm in paranoid mode by this time, and turn on debugging before continuing:

---
cpan> install Mac::Glue
Debug(CPAN:Dev:Pseudo,9,[CPAN::shell|1|UNDEF]): line[install|Mac::Glue]
Debug(Shell:Phoenix:Applications:MacPerl 5.2.0r4:site_perl:CPAN.pm,1787,[CPAN::Shell::rematein|1|UNDEF]): pragma[]meth[install] some[Mac::Glue]
$VAR1 = bless( {
                 'statd' => 'a',
                 'description' => 'Control apps with AppleScript terminology',
                 'stati' => 'O',
                 'statl' => 'p',
                 'userid' => 'CNANDOR',
                 'ID' => 'Mac::Glue',
                 'modid' => 'Mac::Glue',
                 'stats' => 'd'
               }, 'CPAN::Module' );
Debug(Shell:Phoenix:Applications:MacPerl 5.2.0r4:site_perl:CPAN.pm,1787,[CPAN::Shell::rematein|1|UNDEF]): pragma[]meth[install]obj[CPAN::Module=HASH(0x2458c34)]as_string[Module id = Mac::Glue
    DESCRIPTION  Control apps with AppleScript terminology
    CPAN_USERID  CNANDOR (Chris Nandor <pudge@pobox.com>)
    DSLI_STATUS  adpO (alpha,developer,perl,object-oriented)
    INST_FILE    (not installed)

]
Debug(Module:Phoenix:Applications:MacPerl 5.2.0r4:site_perl:CPAN.pm,4099,[CPAN::Module::rematein|1|0]): Mac::Glue
Debug(Module:Phoenix:Applications:MacPerl 5.2.0r4:site_perl:CPAN.pm,4037,[CPAN::Module::cpan_file|1|0]): Mac::Glue

  The module Mac::Glue isn't available on CPAN.

  Either the module has not yet been uploaded to CPAN, or it is
  temporary unavailable. Please contact the author to find out
  more about the status. Try ``i Mac::Glue''.
---

Ok, so automatic installation doesn't look like it's going to work, for reasons beyond my control.  Time to do it the old fashioned way!

I downloaded glue.19990622.tar.gz from Chris' website.  Fine.  Drop it on StuffIt Expander to open it up.  Cool.  Look for a README.  Yep, there it is.  Read the README.  Looks to be identical to what I'm reading on the web page.  Alright, time to "run installme on this distribution".  Err, how do I do that?  Double-click installme.plx?  Nope.  Double-click and run Makefile.PL?  Nope.  Hmmm...  Back to the README.  Ah, drop the folder on installme.plx.  Try that.  Fails.  Download a *second* copy of glue.19990622.tar.gz and drag-drop the whole thing onto installme.plx.  Works!

Ok, the README says I have to do it twice.  OK, so I drag-drop again:

---
# :glue.19990622:ex already exists, will not overwrite
---

Alright, figuring that glue.19990622 is a destination folder and not a source folder, I trash the one created by the first installation and try again.  It works.

(By the way.  The installers don't ever notify you that an installation has actually finished.  The camel stops racing and control is returned, but nothing is ever mentioned on the screen.  Some positive feedback would be nice, IMHO.)

Anyway, time to run gluedialect as instructed.  That bombs with a stack of warnings (or are they errors? how does one tell?):

---
# Use of uninitialized value.
File 'Phoenix:Applications:MacPerl 5.2.0r4:site_perl:Mac:Glue.pm'; Line 18
# Use of uninitialized value.
File 'Phoenix:Applications:MacPerl 5.2.0r4:site_perl:Mac:Glue.pm'; Line 18
# Use of uninitialized value.
File 'Phoenix:Applications:MacPerl 5.2.0r4:site_perl:Mac:Glue.pm'; Line 18
# Use of uninitialized value.
File 'Phoenix:Applications:MacPerl 5.2.0r4:site_perl:Mac:Glue.pm'; Line 18
# Mac::AppleEvents version 1.22 required--this is only version .
File 'Phoenix:Applications:MacPerl 5.2.0r4:site_perl:Mac:Glue.pm'; Line 18
# BEGIN failed--compilation aborted.
File 'Phoenix:Applications:MacPerl 5.2.0r4:site_perl:Mac:Glue.pm'; Line 18
# BEGIN failed--compilation aborted.
File 'Phoenix:Applications:MacPerl 5.2.0r4:glue.19990622:scripts:gluedialect'; Line 10
---

Hmmm...  I search through the folders and find Mac::AppleEvents just where it's supposed to be.  I then manually compare the date stamps on all AE-related files with those contained in glue.19990622 - they all check out.  I remember somewhere something about file paths so I check MacPerl's preferences and :site_perl: is there alright, but it's underneath :lib:.  Guessing that old modules may be in use, I add :site_perl: and then try gluedialect again:

---
# Global symbol "Gestalt" requires explicit package name.
File 'Phoenix:Applications:MacPerl 5.2.0r4:glue.19990622:scripts:gluedialect'; Line 16
# Execution of Phoenix:Applications:MacPerl 5.2.0r4:glue.19990622:scripts:gluedialect aborted due to compilation errors.
---

Well, at least there is only one error this time!  Heck, I might even be able to work this one out.  Let's check the suspect code:

---
if (!@ARGV) {
  $ARGV[0] = catdir(($Gestalt{gestaltSystemVersion()} < hex(800)
    ? FindFolder(kOnSystemDisk, 'Ÿscr')
    : FindFolder(kOnSystemDisk, kExtensionFolderType) .
      ":Scripting Additions"), 'Dialects');
}
---

Fair enough.  Looks like Mac OS 8.0.0 was when Scripting Additions became a blessed folder.  For some reason, Gestalt is having a spit.  Well, if it wants an explicit name, I'll give it one: "Phoenix:System Folder:Scripting Additions".  Try it again.  Right, that did the trick.

Now I try running gluescriptsadd and, guess what:

---
# Global symbol "Gestalt" requires explicit package name.
File 'Phoenix:Applications:MacPerl 5.2.0r4:glue.19990622:scripts:gluescriptadds'; Line 16
# Execution of Phoenix:Applications:MacPerl 5.2.0r4:glue.19990622:scripts:gluescriptadds aborted due to compilation errors.
---

Identical to the one before.  Making the same change as before weems to work and makes the problem go away, resulting in a clean run.  A whole pile of glues appear in :site_perl:Mac:Glue:glues:additions: folder - looking good!

Alright.  Drag-drop The Finder onto gluemac:

---
# Please run gluedialect and gluescriptadds programs..
File 'Phoenix:Applications:MacPerl 5.2.0r4:site_perl:Mac:Glue.pm'; Line 709
---

Huh?  Don't like the sound of that, but a glue file *has* been created so I plough on...  I attempt to run the example script "get files in System Folder":

---
# Please run gluedialect and gluescriptadds programs..
File 'Phoenix:Applications:MacPerl 5.2.0r4:site_perl:Mac:Glue.pm'; Line 709
# Class 'property' does not exist for 'System Folder'.
# 	Mac::Glue::_do_obj('Mac::Glue::GLUE0=HASH(0x196f9d0)', 'System Folder', 'property', undef) called
File 'Phoenix:Applications:MacPerl 5.2.0r4:site_perl:Mac:Glue.pm'; Line 670
# 	Mac::Glue::obj('Mac::Glue::GLUE0=HASH(0x196f9d0)', 'property', 'System Folder') called
File 'Phoenix:Applications:MacPerl 5.2.0r4:glue.19990622:ex:get files in System Folder'; Line 6
---

At this point I give up - too many errors had been generated along the way and I was no linger confident of the integrity of my MacPerl installation as a whole.  Obviously I'm missing something - problem is that I don't know where it is.

1) The cpan-mac initialisation error?
2) The error generated by installme.plx on the second install attempt?
3) Did changing the library path actually make things better, or worse?
4) If gestalt isn't working, what *else* isn't working?
5) Glue files appear, but work do they not!

I'm ready to trash my MacPerl directory and start from scratch - reinstalling everything to a virgin state.  Now that I've gone through the process once (well, sorta) it shouldn't take that long.

I'm confident I have a good grasp on this whole thing.  About the only bit I wasn't sure of was "make sure that you have a HOME variable set in your environment variables preferences in the MacPerl application" - is it just me or is there *nowhere* which explains the purpose of this variable, or what it *should* be set to?  I hedged my bets and pointed it to my "MacPerl 5.2.0r4" folder (before I installed cpan-mac, of course).  Did I do the right thing?  The cpan-mac installation went smoothly, so I assumed I did.

Anyway, that was my first experience of cpan-mac and Mac::Glue.  Gotta *love* alpha-testing!  ;)

Henry.

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-modules-request@macperl.org