Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Perl / June 2006



Tip: Looking for answers? Try searching our database.

Mac::Carbon for Intel ... Done?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris Nandor - 20 Jun 2006 03:27 GMT
OK, I've uploaded Mac-Carbon-0.75 to the CPAN.

    http://use.perl.org/~pudge/journal/29967

Go play with it, if you have an Intel Mac.  Let me know if you find
anything wrong, and let me know soon, since I have less than a week left
with this Intel Mac.

A new Mac::Glue release is following. It is currently broken on Intel, too.

Signature

Chris Nandor                      pudge@pobox.com    http://pudge.net/
Open Source Technology Group       pudge@ostg.com     http://ostg.com/

Paul McCann - 20 Jun 2006 03:40 GMT
Hi Chris,

> Go play with it, if you have an Intel Mac.  Let me know if you find
> anything wrong, and let me know soon, since I have less than a week  
> left
> with this Intel Mac.

The module (Mac-Carbon-0.75) was fine through "make" on my intel Mac  
(modulo all the "deprecated" warnings of course, which I imagine  
should be ignored).

However "make test" failed  with the following problem:

AppleEvents/t/desc.............NOK 2#   Failed test 'require '"$Bin/
helper.pl"';'
#   in AppleEvents/t/desc.t at line 11.
#     Tried to require ''"$Bin/helper.pl"''.
#     Error:  Can't locate "$Bin/helper.pl" in @INC (@INC contains: /
Users/pmccann/Desktop/downloaded/Mac-Carbon-0.75/blib/lib /Users/
pmccann/Desktop/downloaded/Mac-Carbon-0.75/blib/arch /System/Library/
Perl/5.8.6/darwin-thread-multi-2level /System/Library/Perl/5.8.6/
darwin-thread-multi-2level /System/Library/Perl/5.8.6 /Library/Perl/
5.8.6/darwin-thread-multi-2level /Library/Perl/5.8.6/darwin-thread-
multi-2level /Library/Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-
multi-2level /Library/Perl/5.8.6 /Library/Perl /Network/Library/Perl/
5.8.6/darwin-thread-multi-2level /Network/Library/Perl/5.8.6 /Network/
Library/Perl /System/Library/Perl/Extras/5.8.6/darwin-thread-
multi-2level /System/Library/Perl/Extras/5.8.6/darwin-thread-
multi-2level /System/Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1 . /
System/Library/Perl/5.8.6/darwin-thread-multi-2level /System/Library/
Perl/5.8.6 /Library/Perl/5.8.6/darwin-thread-multi-2level /Library/
Perl/5.8.6 /Library/Perl /Network/Library/Perl/5.8.6/darwin-thread-
multi-2level /Network/Library/Perl/5.8.6 /Network/Library/Perl /
System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level /System/
Library/Perl/Extras/5.8.6 /Library/Perl/5.8.1 .) at (eval 6) line 2.

Cheers,
Paul
Chris Nandor - 20 Jun 2006 19:07 GMT
> Hi Chris,
>
[quoted text clipped - 6 lines]
> (modulo all the "deprecated" warnings of course, which I imagine  
> should be ignored).

Yeah.

> However "make test" failed  with the following problem:

Someone else had the same problem.  First, did any other test fail?  I
imagine AppleEvents/t/desc and AppleEvents/t/event failed.  Any others?  I
had a report about Speech.t.

Second, do you have the file AppleEvents/t/helper.pl?  If so, then I am
supposing FindBin is not working for you as it works for me, which puzzles
me, but not enough that I will spend much more time on it, I'll just throw
something together to make it work.

Finally, you can hardcode the path to helper.pl in desc.t and event.t and
run the tests again.

Thanks,

Signature

Chris Nandor                      pudge@pobox.com    http://pudge.net/
Open Source Technology Group       pudge@ostg.com     http://ostg.com/

Paul McCann - 21 Jun 2006 00:28 GMT
Hi again,

Yes, AppleEvents/t/event and AppleEvents/t/desc were both failing  
with  the same error message:

=======================================================================
AppleEvents/t/event............NOK 2#   Failed test 'require '"$Bin/
helper.pl"';'
#   in AppleEvents/t/event.t at line 11.
#     Tried to require ''"$Bin/helper.pl"''.

[...].

AppleEvents/t/desc.............NOK 2#   Failed test 'require '"$Bin/
helper.pl"';'
#   in AppleEvents/t/desc.t at line 11.
#     Tried to require ''"$Bin/helper.pl"''.
=======================================================================

> Second, do you have the file AppleEvents/t/helper.pl?

Yep, present and correct.

> Finally, you can hardcode the path to helper.pl in desc.t and  
event.t and
run the tests again.

OK: after a bit of head-scratching and a few failed attempts to do  
this I scrounged together the following modification to the BEGIN  
block for both desc.t and event.t:

BEGIN {
        use_ok('Mac::AppleEvents');
#       require_ok('"$Bin/helper.pl"');
        push @INC,"/Users/pmccann/Desktop/downloaded/Mac-Carbon-0.75/
AppleEvents/t";
        require_ok("helper.pl");
}

With that in place we get success:

% make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"  
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t */t/*.t
AppleEvents/t/desc.............ok
AppleEvents/t/event............ok
Components/t/Components........ok
Files/t/Alias..................ok
        1/17 skipped: This fails on both UFS and Intel ... so just  
stop caring.  It's deprecated.
Files/t/Constants..............ok
Files/t/Files..................ok
Files/t/Info...................ok
Gestalt/t/Gestalt..............ok
MacPerl/t/MacPerl..............ok
        3/13 skipped: Set MAC_CARBON_GUI in env to run tests
Memory/t/Memory................ok
MoreFiles/t/MoreFiles..........ok
Notification/t/Notification....ok
        11/11 skipped: Set MAC_CARBON_GUI in env to run tests
Processes/t/Processes..........ok
        2/6 skipped: No parent available
Resources/t/Resources..........ok
Sound/t/Sound..................ok
Speech/t/Speech................ok
t/Carbon.......................ok
Types/t/Types..................ok
All tests successful, 17 subtests skipped.
Files=18, Tests=2958, 33 wallclock secs ( 2.08 cusr +  0.81 csys =  
2.89 CPU)

Cheers,
Paul
Ken Williams - 23 Jun 2006 14:10 GMT
> Hi Chris,
>
[quoted text clipped - 14 lines]
> #     Tried to require ''"$Bin/helper.pl"''.
> #     Error:  Can't locate "$Bin/helper.pl" in @INC

Chris: it's not interpolating the $Bin variable and the quotes are  
literal quotes too.

 -Ken
Chris Nandor - 23 Jun 2006 15:20 GMT
>> Hi Chris,
>>
[quoted text clipped - 17 lines]
>Chris: it's not interpolating the $Bin variable and the quotes are
>literal quotes too.

But the problem was: why did it work on *my* computer?

Turns out to be a combination of my typo, and an old version of Test::More.
First, I reversed the quotes.  I initially had:

    require "$Bin/helper.pl";

I changed that to:

    require_ok("$Bin/helper.pl");

That would have worked (I now know) on a newer Test::More, but it did not
work on mine, so I changed it to:

    require_ok('"$Bin/helper.pl"');

I meant to put the single quotes inside the double quotes, but I didn't
notice because ... it worked!  The reason why is because Test::More changes
that to:

    eval <<EOT;
package main;
require "\$Bin/helper.pl";
EOT

So then $Bin is evaluated in its proper context.  Neat.

Anyway, rather than making people upgrade their Test::More for this one
test, I reverted it back to a plain require() for 0.76, which is on your
CPAN shelves now.

Signature

Chris Nandor                      pudge@pobox.com    http://pudge.net/
Open Source Technology Group       pudge@ostg.com     http://ostg.com/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.