|
From: Gerry Ford on 15 Apr 2008 00:56 "Tad J McClellan" <tadmc(a)seesig.invalid> wrote in message news:slrng06hbt.pbt.tadmc(a)tadmc30.sbcglobal.net... > Gerry Ford <gerry(a)nowhere.ford> wrote: > > >> The part I don't get right now is what follows the vanilla use statements > > >> use HTTP::Date qw/time2str str2time/; > >> What does it mean? > > > perldoc -f use This is the current contents of my Path system variable: C:\Program Files\perl3\site\bin;C:\Program Files\perl3\bin;c:\path\gcc\bin;C:\Program Files\Silverfrost\FTN95;C:\Perl\site\bin;C:\Perl\bin;c:\ruby\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem This is, BTW, something that AS perl users on windows need to go in and trim after installations. The installation that is right off the root I'll trim out (it's 5.8). It confuses the heck out of windows and linkers at precisely the wrong time to have one path to one installation and another to an older one, in particular, in reverse order. I was wondering why I can use perldoc from a dos window anywhere, and see that the answer is that the path leads to the binaries, wherein we see perldoc.bat. I wouldn't have believed for a second that this is how I get output with the perldoc command: @rem = '--*-Perl-*-- @echo off if "%OS%" == "Windows_NT" goto WinNT perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofperl :WinNT perl -x -S %0 %* if NOT "%COMSPEC%" == "%SystemRoot%\system32\cmd.exe" goto endofperl if %errorlevel% == 9009 echo You do not have Perl in your PATH. if errorlevel 1 goto script_failed_so_exit_with_non_zero_val 2>nul goto endofperl @rem '; #!perl #line 15 eval 'exec C:\Program Files\perl3\bin\perl.exe -S $0 ${1+"$@"}' if 0; # This "perldoc" file was generated by "perldoc.PL" require 5; BEGIN { $^W = 1 if $ENV{'PERLDOCDEBUG'} } use Pod::Perldoc; exit( Pod::Perldoc->run() ); __END__ :endofperl -- "Shopping for toilets isn't the most fascinating way to spend a Saturday afternoon. But it beats watching cable news." ~~ Booman
From: A. Sinan Unur on 15 Apr 2008 01:24 "Gerry Ford" <gerry(a)nowhere.ford> wrote in news:1208234940_6(a)news.newsgroups.com: > > "Tad J McClellan" <tadmc(a)seesig.invalid> wrote in message > news:slrng06hbt.pbt.tadmc(a)tadmc30.sbcglobal.net... >> Gerry Ford <gerry(a)nowhere.ford> wrote: >> >> >>> The part I don't get right now is what follows the vanilla use >>> statements >> >> >>> use HTTP::Date qw/time2str str2time/; >> >>> What does it mean? >> >> >> perldoc -f use > > This is the current contents of my Path system variable: OK, but why are you listing it. > C:\Program Files\perl3\site\bin;C:\Program > Files\perl3\bin;c:\path\gcc\bin;C:\Program > Files\Silverfrost\FTN95;C:\Perl\site\bin;C:\Perl\bin;c:\ruby\bin; > %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem > > This is, BTW, something that AS perl users on windows need to go > in and trim after installations. I have never had to do that. Could you explain what needs to be trimmed and why? The only thing I can see is that you seem to have installed Perl twice. Once in a non-default subdirectory of C:\Program Files. You also have gcc there which might confuse CPAN.pm or command line build tools. > I was wondering why I can use perldoc from a dos window anywhere, > and see that the answer is that the path leads to the binaries, > wherein we see perldoc.bat. I wouldn't have believed for a second > that this is how I get output with the perldoc command: Again, why is that hard to believe. > > @rem = '--*-Perl-*-- > @echo off > if "%OS%" == "Windows_NT" goto WinNT > perl -x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 > goto endofperl >:WinNT > perl -x -S %0 %* perl --help -x[directory] strip off text before #!perl line and perhaps cd to directory -S look for programfile using PATH environment variable Did you have a question? Sinan -- A. Sinan Unur <1usa(a)llenroc.ude.invalid> (remove .invalid and reverse each component for email address) comp.lang.perl.misc guidelines on the WWW: http://www.rehabitation.com/clpmisc/
From: Gerry Ford on 15 Apr 2008 02:09 "A. Sinan Unur" <1usa(a)llenroc.ude.invalid> wrote in message news:Xns9A80CC6552B84asu1cornelledu(a)127.0.0.1... > "Gerry Ford" <gerry(a)nowhere.ford> wrote in > news:1208216001_0(a)news.newsgroups.com: >> Here's where I run into double trouble. I'm having a heckuva time >> figuring out what he means with win32::ansiconsole. > > Please capitalize module names properly. Case matters. Thanks for your response. I'll need to shift gears from fortran, which is case insensitive. > 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. 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. At the above link, I get this: package Win32::Console::ANSI; # # Copyright (c) 2004 Jean-Louis Morel <jl_morel(a)bribes.org> # # Version 1.01 (08/06/2005) # # This program is free software; you can redistribute it and/or modify # it under the same terms as Perl itself. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the # GNU General Public License or the Artistic License for more details. # use 5.006; use strict; use warnings; require Exporter; our @ISA = qw(Exporter); our $VERSION = '1.00'; our %EXPORT_TAGS = ( 'all' => [ qw( Title Cursor XYMax SetConsoleSize Cls ScriptCP )], ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} }, ); our @EXPORT = qw( ); package Win32::Console::ANSI; require XSLoader; XSLoader::load('Win32::Console::ANSI', $VERSION); 1; __END__ # pod data elided for length First of all, Cls is, by your criterion, different from cls, and there is no coninit at all. > 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(a)cshl.org) Automated accessor generation Marty Pauley (marty+perl(a)kasei.com) Inheritable, overridable class data Tony Bowden (tony(a)tmtm.com) class and object builder, hash version GomoR (netpkt(a)gomor.org) Get information about a class and its structure Adam Kennedy (adamk(a)cpan.org) Fast prototype-based OO programming in Perl. Toby Ovod-Everett (toby(a)ovod-everett.org) Base class for creating singleton objects Andy Wardley This looks like it was expecting a program to read text, not a human ambling about, trying to find a module. > perl -MNet::NNTP -e "print qq{$Net::NNTP::VERSION\n}" > 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. >> What's puzzling is that I'm able to use net::nntp having >> downloaded nothing but AS 5.10. I looked in the installed modules >> and see no reason for this good fortune. > You can see at http://perldoc.perl.org/index-modules-N.html > that both Net::NNTP and Net::SMTP are core modules. Gotcha. This is necessary viewing for persons who are taking their first steps with modules. > However, do read the posting guidelines first. Just to prove I was there for the sixth time: Beware of saying ``doesn't work'' -- "Shopping for toilets isn't the most fascinating way to spend a Saturday afternoon. But it beats watching cable news." ~~ Booman
From: A. Sinan Unur on 15 Apr 2008 02:35 "Gerry Ford" <gerry(a)nowhere.ford> wrote in news:1208239309_8(a)news.newsgroups.com: > "A. Sinan Unur" <1usa(a)llenroc.ude.invalid> wrote in message > news:Xns9A80CC6552B84asu1cornelledu(a)127.0.0.1... >> "Gerry Ford" <gerry(a)nowhere.ford> wrote in >> news:1208216001_0(a)news.newsgroups.com: > > >>> 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(a)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{$Net::NNTP::VERSION\n}" >> 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 -- A. Sinan Unur <1usa(a)llenroc.ude.invalid> (remove .invalid and reverse each component for email address) comp.lang.perl.misc guidelines on the WWW: http://www.rehabitation.com/clpmisc/
From: Gerry Ford on 15 Apr 2008 16:31 "A. Sinan Unur" <1usa(a)llenroc.ude.invalid> wrote in message news:Xns9A811A523EFEEasu1cornelledu(a)127.0.0.1... > "Gerry Ford" <gerry(a)nowhere.ford> wrote in > news:1208239309_8(a)news.newsgroups.com: > >> "A. Sinan Unur" <1usa(a)llenroc.ude.invalid> wrote in message >> news:Xns9A80CC6552B84asu1cornelledu(a)127.0.0.1... >>> 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 = (@{$EXPORT_TAGS{'const'}}, 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(a)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
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: anyone has done this kind of perl/CGI? Next: FAQ 9.12 How do I put a password on my web pages? |