Mixing MacPerl and Glue causes Halucinations
here is a short Perl program: #!/usr/bin/perl #use Mac::Glue; use MacPerl; $val = MacPerl::Answer("Pick your function","Edit Program", "Receive Program", "Send Program"); Now if you run this you get a graphical UI dialog box. If you uncomment the Mac::Glue line, it will no longer be a graphical UI, but a text one on the console. What am I doing wrong here? (Other than using a Mac...) All I need for this program is a simple UI for picking files from a directory, a save dialog and a couple of list dialogs with buttons. The rest is socket code and misc processing to talk to a serial to ethernet box. Alan Olsen [EMAIL PROTECTED] [EMAIL PROTECTED]
Re: CPAN installing to somewhere not in @INC
On Jun 10, 2004, at 7:27 PM, John Horner wrote: CPAN is running with the older version and reporting that everything's fine, but the scripts are running with the new version and for them, it's not. That sounds like a PATH issue. Scripts begin with #!/usr/bin/perl, so they use that specific perl. But if you're starting the CPAN shell with 'perl -MCPAN -e shell', then that command will use the first perl to appear in your PATH. And if you're starting the CPAN shell with 'cpan', that script begins with a #! that points to the Perl it was installed with. Run 'echo $PATH' in a terminal to see what your PATH variable is set to. You could also use 'which perl' to see, well, which perl you're running. You could also run 'which cpan', and take a look at the first line of the script that shows you. And 'perl -v' will give you the Perl version - if that's different than '/usr/bin/perl -v', it's definitely a PATH mix-up. What would I do, for the sake of argument, if I really wanted to clean up my system and get rid of all traces of Perl 5.8.0 and its installed modules? 5.8.0? Did you follow Apple's old instructions for installing 5.8.0 on Jaguar, by any chance? If so, it's an easy fix - simply delete everything below /Library/Perl *except* for /Library/Perl/5.8.1 and its subdirectories. And if there's a perl binary and/or cpan script in your PATH before the ones in /usr/bin - I suspect there is, if you followed Apple's old directions, in /usr/local/bin - delete them. I thought installing the latest Dev Tools and Perl 5.8.1 would make everything simple and make everything work but apparently not... If you wanted simple you chose the wrong profession. ;-) sherm--
Re: CPAN installing to somewhere not in @INC
That's key - you need to understand that the module is *not* in an incorrect location. It's in the correct location for the Perl it was installed under, and your current Perl avoids looking in that location for a good reason. Nothing is broken in that regard. What you need to figure out is why the CPAN shell is finding that module when it shouldn't. OK, I think I'm getting the idea. I have two version of Perl. Some modules are compiled with one version of Perl and won't work with the other. CPAN is running with the older version and reporting that everything's fine, but the scripts are running with the new version and for them, it's not. What would I do, for the sake of argument, if I really wanted to clean up my system and get rid of all traces of Perl 5.8.0 and its installed modules? I thought installing the latest Dev Tools and Perl 5.8.1 would make everything simple and make everything work but apparently not... "Have You Validated Your Code?" John Horner(+612 / 02) 9333 2110 Senior Developer, ABC Online http://www.abc.net.au/