Skip Menu |
 

This queue is for tickets about the Mac-iTerm-LaunchPad CPAN distribution.

Report information
The Basics
Id: 24473
Status: resolved
Priority: 0/
Queue: Mac-iTerm-LaunchPad

People
Owner: Nobody in particular
Requestors: stennie [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.004
Fixed in: (no value)



Subject: Module fails to load if iTerm glue has not been created
Download (untitled) / with headers
text/plain 431b
# Failed test 'use Mac::iTerm::LaunchPad;' # in t/load.t at line 10. # Tried to use 'Mac::iTerm::LaunchPad'. # Error: No application glue for 'iTerm' found in '/Library/Perl/5.8.6/Mac/Glue/glues' The module will not load unless the Mac::Glue info has been created first via: sudo gluemac /path/to/iTerm.app Attached is a test script which will check the glue info, and prompt to create if missing. Cheers, Stephen
Subject: glue.t
Download glue.t
text/x-perl 666b
use Mac::Glue; use Mac::Processes; # part of Mac::Carbon, which is prereq for Mac::Glue use Test::More tests => 1; my $iterm; eval { $iterm = new Mac::Glue 'iTerm'; }; if ($@) { my $iterm_path = LSFindApplicationForInfo(undef, undef, 'iTerm.app'); if ($iterm_path) { my $cmdline = "sudo gluemac $iterm_path"; print "\nTo create the Mac::Glue bindings for iTerm you need to run: \n\n $cmdline\n"; print "\nWould you like to run this now? (y/N) "; my $confirm = <>; chomp $confirm; if (lc($confirm) eq 'y') { `sudo gluemac $iterm_path`; eval { $iterm = new Mac::Glue 'iTerm'; }; } } } ok(ref($iterm), 'Loaded Mac::Glue for iTerm');
Download (untitled) / with headers
text/plain 258b
I took some of the code that you had in the glue.t and moved it into the Makefile.PL so it installs the iTerm glue before the tests get going. I also fixed up the backticks to use system so the user sees the gluemac prompts (and it's more secure). Thanks :)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.