Click here to get back home

modules for nntp client

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    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
modules for nntp client Gerry Ford 04-14-2008
Get Chitika Premium
Posted by A. Sinan Unur on April 15, 2008, 2:35 am
Please log in for more thread options

>
>
>>> Here's where I run into double trouble. I'm having a heckuva
>>> time figuring out what he means with win32::ansiconsole.

...

>> In any case, I am not sure but I am assuming it is an
>> version of the following module:
>>
>> http://search.cpan.org/~jlmorel/Win32-Console-ANSI-1.00/
>
> I don't think it is.

I think it is.

You snipped it but

http://backpan.perl.org/authors/id/J/JL/JLMOREL/

http://backpan.perl.org/authors/id/J/JL/JLMOREL/Win32-ANSIConsole-0.01.tar.gz

shows it to be.

> When I have a script with
> use Win32::ANSIConsole qw/coninit cls/;
> , perl.exe is looking for an absent ANSIConsole.pm that has
> coninit and cls defined.

...

> First of all, Cls is, by your criterion, different from cls, and
> there is no coninit at all.

The API might have changed between Win32::ANSIConsole and
Win32::Console::ANSI. Clearly, the module is available from the
backpan link. If it is a Pure Perl module, you can install it
by unpacking the archive and manually copying the files to
a custom directory and reading

perldoc lib

>> If you cannot find that through ppm, you might want to
>> add the following repositories:
>>
>> Name: uwinnipeg
>> URL: http://cpan.uwinnipeg.ca/PPMPackages/10xx/package.xml
>>
>> Name: trouchelle
>> URL: http://trouchelle.com/ppm10/package.xml
>>
>> Name: Bribes
>> URL: http://www.bribes.org/perl/ppm/package.xml
>
> I looked at these, and they look like:
> Common Gateway Interface Class Lincoln D. Stein (lstein@cshl.org)

Those are repositories to add to ppm.

> This looks like it was expecting a program to read text, not a
> human ambling about, trying to find a module.

Exactly. Add the repositories to ppm.

>> perl -MNet::NNTP -e "print qq"
>> will print the version installed (assuming it is installed).
> 2.24
>
>>> win32::ansiconsole. Without the module for me to look at, I'm
>>> not gonna figure out what, e.g. coninit is.
>>
>> E:\Home\asu1> ppm install Win32::Console::ANSI
>> Downloading Win32-Console-ANSI-1.00...done
>> Unpacking Win32-Console-ANSI-1.00...done
>> Generating HTML for Win32-Console-ANSI-1.00...done
>> Updating files in site area...done
>> 7 files installed
> How do I replicate this process on windows? As it is, a file that
> ends in tar.gz just creates huge problems for me.

Use ppm.

If I understand correctly, right now you are trying to get a program
written by someone else to run on your system. Since clp.misc is not
a support group for random scripts found on the web, you should expect
to either do a considerable amount of work yourself or obtain support
from the author of the script.

After reading the source of the module

http://backpan.perl.org/authors/id/J/JL/JLMOREL/Win32-ANSIConsole-0.01.tar.gz

you can decide if consinit and cls are necessary and look for a way of
replacing that functionality if needed.

Or, as I mentioned above, you can manually unpack the module files
without relying on the automated process which ppm gives you for
modules found in current repositories.

Sinan

--
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/

Posted by Gerry Ford on April 15, 2008, 4:31 pm
Please log in for more thread options

>

>>> In any case, I am not sure but I am assuming it is an
>>> version of the following module:
>>>
>>> http://search.cpan.org/~jlmorel/Win32-Console-ANSI-1.00/
>>
>> I don't think it is.
>
> I think it is.

Thanks again for your attention.

It turned out we were somewhat both correct (and errant, but that's glass
half-empty). I heard from the author and downloaded what he thought
ANSIConsole.pm was. Here's what the first of it looks like:
package Win32::ANSIConsole;

use strict;
use warnings;
use Win32::Console::ANSI qw/SetConsoleSize Title/;

require Exporter;
our @ISA = qw(Exporter);
our %EXPORT_TAGS = ('const' => [qw(BOLD UNDER BLINK REVERSE
BLACK RED GREEN YELLOW BLUE MAGENTA CYAN WHITE
BBLACK BRED BGREEN BYELLOW BBLUE BMAGENTA BCYAN BWHITE)]);
our @EXPORT_OK = (@}, qw(coninit title attr cls
clreol curpos));

, so Win32::Console::ANSI is just a heartbeat away, and this version is a
home-rolled wrapper that probably makes a sexier layout on windows because
of what all he stuffs into coninit (it's rows, columns and colors--win32
specific).

With his version in /lib/Win32/ and your version in /lib/Win32/Console,
perl.exe doesn't puke on any of the use statements. All but this one were
included in the core.


>>> If you cannot find that through ppm, you might want to
>>> add the following repositories:
>>>
>>> Name: uwinnipeg
>>> URL: http://cpan.uwinnipeg.ca/PPMPackages/10xx/package.xml
>>>
>>> Name: trouchelle
>>> URL: http://trouchelle.com/ppm10/package.xml
>>>
>>> Name: Bribes
>>> URL: http://www.bribes.org/perl/ppm/package.xml
>>
>> I looked at these, and they look like:
>> Common Gateway Interface Class Lincoln D. Stein (lstein@cshl.org)
>
> Those are repositories to add to ppm.
>
>> This looks like it was expecting a program to read text, not a
>> human ambling about, trying to find a module.
>
> Exactly. Add the repositories to ppm.

This was a huge breakthrough for me today. I was able to use AS's ppm with
confidence for the first time today. I got two of those loaded. AS hangs
on the trouchelle one. (?)

>>> E:\Home\asu1> ppm install Win32::Console::ANSI
>>> Downloading Win32-Console-ANSI-1.00...done
>>> Unpacking Win32-Console-ANSI-1.00...done
>>> Generating HTML for Win32-Console-ANSI-1.00...done
>>> Updating files in site area...done
>>> 7 files installed
>> How do I replicate this process on windows? As it is, a file that
>> ends in tar.gz just creates huge problems for me.
>
> Use ppm.

Are you suggesting that if I have a tar.gz creature on my desktop, I can use
ppm to install it?
--
"Shopping for toilets isn't the most fascinating way to spend a Saturday
afternoon. But it beats watching cable news."

~~ Booman



Posted by A. Sinan Unur on April 15, 2008, 7:37 pm
Please log in for more thread options

>

...

>>>> E:\Home\asu1> ppm install Win32::Console::ANSI
>>>> Downloading Win32-Console-ANSI-1.00...done
>>>> Unpacking Win32-Console-ANSI-1.00...done
>>>> Generating HTML for Win32-Console-ANSI-1.00...done
>>>> Updating files in site area...done
>>>> 7 files installed
>>> How do I replicate this process on windows? As it is, a file
>>> that ends in tar.gz just creates huge problems for me.
>>
>> Use ppm.
>
> Are you suggesting that if I have a tar.gz creature on my desktop,
> I can use ppm to install it?

No, I misunderstood your question.

I have MS VC++ Express 2008 (or version 9, it goes by both names
apparently) installed. So far, I have run into no problems with

perl Makefile.PL

nmake -f Makefile

nmake -f Makefile test

nmake -f Makefile install

If you do install it, make sure to run the commands in cmd.exe shell
you start by using the shortcut installed in the Tools subfolder of
the VC++ folder in the start menu.

So, extract the compressed archive into a directory (preserving the
directory structure), start the said cmd.exe shell and off you go!

You might find

http://sourceforge.net/projects/console/

useful.

There is also Strawberry Perl http://strawberryperl.com/

I haven't looked at it since last year, but the new site design is
cute!

Sinan

--
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/

Posted by Ben Morrow on April 15, 2008, 9:29 pm
Please log in for more thread options

>
> I have MS VC++ Express 2008 (or version 9, it goes by both names
> apparently) installed. So far, I have run into no problems with

If this is with ActivePerl, you may be better off swiching to gcc.
ActivePerl is built with MSVC 6, and MSVC 9 has a different,
incompatible (differently-named, in fact) msvcrt.dll. This means that if
an extension calls a libc function directly, you will end up trying to
load two different versions of the C library into the same process.
Unsurprisingly, this doesn't work terribly well... gcc uses a MSVC
6-compatible msvcrt.dll, and recent versions of ActivePerl have support
for switching to gcc if it's in your path.

Ben


Posted by A. Sinan Unur on April 16, 2008, 9:07 am
Please log in for more thread options

>
>>
>> I have MS VC++ Express 2008 (or version 9, it goes by both names
>> apparently) installed. So far, I have run into no problems with
>
> If this is with ActivePerl, you may be better off swiching to gcc.

I decided to give another shot (last time I tried was a few years
back) to building Perl myself. This time, I used VC9 Express. I am
happy to report that everything worked right out of the box.

Thanks to Makefile maintainers.

Sinan

--
(remove .invalid and reverse each component for email address)

comp.lang.perl.misc guidelines on the WWW:
http://www.rehabitation.com/clpmisc/

Similar ThreadsPosted
Cannot authenticate to NNTP server with Net::NNTP authinfo() August 8, 2006, 8:11 pm
Posting to nntp newsgroup with Perl (Net::NNTP) March 4, 2007, 7:05 am
Net::NNTP October 31, 2004, 10:23 pm
NNTP over SSL November 18, 2005, 2:41 am
nntp scan February 7, 2005, 4:51 pm
non nntp usenet January 18, 2008, 4:27 am
$nntp ->list() April 19, 2008, 5:11 pm
Which NNTP module to use? July 27, 2008, 11:30 pm
Net::NNTP, retrieving articles help please December 17, 2004, 3:14 pm
How do I reply a NNTP message? December 6, 2005, 12:46 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap