Click here to get back home

Errors when Installing Modules

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Errors when Installing Modules Jack D 06-23-2008
Get Chitika Premium
Posted by Ch Lamprecht on June 24, 2008, 5:08 pm
Please log in for more thread options
Jack D wrote:
> I see that I have a errors when installing some Tk modules. All the
> errors have to do with not being able to display the GUI during the
> "make test" portion of the install.
>
> http://ppm.activestate.com/beta/author/DUNNIGANJ.html
>
> Errors such as the following:
>
> couldn't connect to display ":0" at
> /home/cpan/perl585/.cpanplus/5.8.5/build/Tk-804.028/blib/lib/Tk/MainWindow.pm
> line 55.
> MainWindow->new() at test.pl line 26
>
> How would I bypass running the GUI test if there is no display to
> connect to so that the install tests show pass instead of fail?
>
> Jack
>

Hi Jack,

you can use Test::More and a SKIP - block, then just test tkinit()

Christoph


use Test::More tests => 17;
BEGIN {use_ok ('Tk');
use_ok ('Tk::MyModule');
}

SKIP:{

my $mw = eval{ tkinit()};

skip 'Tk::MainWindow instantiation failed - skipping Tk-MyModule.t',
15 if $@;

## 15 tests

}#end SKIP


--
use Tk;use Tk::GraphItems;$c=tkinit->Canvas->pack;push@i,Tk::GraphItems->
TextBox(text=>$_,canvas=>$c,x=>$x+=70,y=>100)for(Just=>another=>Perl=>Hacker);
Tk::GraphItems->Connector(source=>$i[$_],target=>$i[$_+1])for(0..2);
$c->repeat(30,sub);MainLoop

Posted by Jack D on June 26, 2008, 1:01 am
Please log in for more thread options
> Jack D wrote:
>> I see that I have a errors when installing some Tk modules. All the
>> errors have to do with not being able to display the GUI during the "make
>> test" portion of the install.
>>
>> http://ppm.activestate.com/beta/author/DUNNIGANJ.html
>>
>> Errors such as the following:
>>
>> couldn't connect to display ":0" at
>> /home/cpan/perl585/.cpanplus/5.8.5/build/Tk-804.028/blib/lib/Tk/MainWindow.pm
>> line 55.
>> MainWindow->new() at test.pl line 26
>>
>> How would I bypass running the GUI test if there is no display to connect
>> to so that the install tests show pass instead of fail?
>>
>> Jack
>>
>
> Hi Jack,
>
> you can use Test::More and a SKIP - block, then just test tkinit()
>
> Christoph
>
>
> use Test::More tests => 17;
> BEGIN {use_ok ('Tk');
> use_ok ('Tk::MyModule');
> }
>
> SKIP:{
>
> my $mw = eval{ tkinit()};
>
> skip 'Tk::MainWindow instantiation failed - skipping Tk-MyModule.t',
> 15 if $@;
>
> ## 15 tests
>
> }#end SKIP
>
Perfect! Thanks Christoph.

Do you know if Test::More a core module?

Jack



Posted by sisyphus on June 26, 2008, 6:18 am
Please log in for more thread options

>
> Do you know if Test::More a core module?
>

It was a core module beginning with 5.6.2:

C:\>perl -MModule::CoreList -e "print Module::CoreList-
>first_release('Test::More')"
5.006002

Cheers,
Rob

Similar ThreadsPosted
CPAN Errors Installing Tk Module November 26, 2004, 9:56 pm
Errors installing XML::Parser from CPAN on Solaris 9 September 7, 2005, 10:29 am
installing modules? September 29, 2005, 1:52 pm
Installing modules August 5, 2005, 8:32 pm
Problem with installing modules November 24, 2006, 6:15 pm
Newbie: Installing Modules February 22, 2007, 5:42 am
installing perl modules and ports September 16, 2004, 12:36 pm
Problem installing certain PERL modules October 15, 2004, 4:47 am
Modules not installing to standard LIB directory November 17, 2005, 8:14 am
Installing modules locally as a non root May 23, 2005, 5:21 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap