Article View: news.software.readers
Article #219263Re: PNews update
From: Gerry Ford
Date: Tue, 15 Apr 2008 09:06
Date: Tue, 15 Apr 2008 09:06
73 lines
3950 bytes
3950 bytes
"Mats Peterson" <matsp555@yahoo.com> wrote in message
news:0iYMj.6088$R_4.4506@newsb.telia.net...
> "Gerry Ford" <gerry@nowhere.ford> wrote:
>>
>> "Mats Peterson" <matsp555@yahoo.com> wrote in message
>> news:tDEMj.6037$R_4.4831@newsb.telia.net...
>>> "Gerry Ford" <gerry@nowhere.ford> wrote:
>>>>
>>
>>>> My question for Mats has to do with the use statements in his client:
>>>> use strict;
>>>> use Net::NNTP;
>>>> use Net::SMTP;
>>>> use HTTP::Date qw/time2str str2time/;
>>>> use MIME::QuotedPrint qw/encode_qp decode_qp/;
>>>> use Encode qw/encode decode/;
>>>> use POSIX qw/strftime/;
>>>> use File::stat;
>>>> use File::Temp qw/:mktemp/;
>>>> use Win32::ANSIConsole qw/coninit cls/;
>>>>
>>>> I believe for perl.exe to know what I'm talking about, I would have to
>>>> download these modules. This isn't as sraightforward as I would like
>>>> with
>>>> windows, but for a guy at my skill level, I think I could marshall
>>>> these
>>>> together. My question goes to this syntax that follows the plain
>>>> vanilla
>>>> "use" statement:
>>>>
>>>> use File::Temp qw/:mktemp/;
>>>> ^^^^^^^^
>>>>
>>>> What does it mean?
>>>
>>> This is explained in the Exporter documentation, which can be viewed
>>> with the command `perldoc Exporter'. Check the "How to Import" section.
>> I tuned up on the import syntax. AS perl has no idea what, e.g.,
>> Win32::ANSIConsole is.
>
> It's all in the README.txt file, including the fact that this module is
> available at http://www.geocities.com/matsp888/windows/lib/.
>
> Unzip it and place the contents somewhere where Perl looks for modules,
> \Perl\site\lib etc.
Thanks, Mats. I think I have what I need to move forward after I catch 40
winks.
One question that I'd like to know from the author. What is so special
about coninit that you go through all this to define it:
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 = (@{$EXPORT_TAGS{'const'}}, qw(coninit title attr cls
clreol curpos));
What would happen if you removed it?
--
"Shopping for toilets isn't the most fascinating way to spend a Saturday
afternoon. But it beats watching cable news."
~~ Booman
Technical Details
Message-ID:
<1208249980_13@news.newsgroups.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!news-out.newsgroups.com!sp12lax.superfeed.net!not-for-mailReferences:
<FQjMj.5999$R_4.4766@newsb.telia.net> <1208149449_40983@news.newsgroups.com> <tDEMj.6037$R_4.4831@newsb.telia.net> <1208237675_7@news.newsgroups.com> <0iYMj.6088$R_4.4506@newsb.telia.net>Show Full Headers
Complete Article Headers
Message-ID: <1208249980_13@news.newsgroups.com> Subject: Re: PNews update Date: Tue, 15 Apr 2008 04:06:54 -0500 From: "Gerry Ford" <gerry@nowhere.ford> References: <FQjMj.5999$R_4.4766@newsb.telia.net> <1208149449_40983@news.newsgroups.com> <tDEMj.6037$R_4.4831@newsb.telia.net> <1208237675_7@news.newsgroups.com> <0iYMj.6088$R_4.4506@newsb.telia.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nac.net!news-out.newsgroups.com!sp12lax.superfeed.net!not-for-mail Lines: 72 Organization: Newsgroups.com Newsgroups: news.software.readers X-Proxy-User: $$s_iz$n-74p X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Report: Please report illegal or inappropriate use to <abuse@newsgroups.com>. Forward a copy of ALL headers INCLUDING the body. (DO NOT SEND ATTACHMENTS) X-Comments2: IMPORTANT: Newsgroups.com does not condone, support, nor tolerate spam or any illegal or copyrighted postings. X-Comments: This message was posted through Newsgroups.com X-Original-Bytes: 3695 X-Original-Lines: 91