[28398] in Perl-Users-Digest
Perl-Users Digest, Issue: 9762 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Sep 25 06:05:47 2006
Date: Mon, 25 Sep 2006 03:05:04 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 25 Sep 2006 Volume: 10 Number: 9762
Today's topics:
Re: Checking for empty cell in Excel Spreadsheet <pamelapdh@aol.com>
Re: empty fields <someone@example.com>
Re: Federated CGI to CGI <matt.toy@gmail.com>
Re: Federated CGI to CGI <matt.toy@gmail.com>
Re: Federated CGI to CGI (reading news)
Re: Federated CGI to CGI <matt.toy@gmail.com>
Re: Help with "require" and importing constants <news@lawshouse.org>
Re: Help with "require" and importing constants (reading news)
Re: Help with "require" and importing constants <someone@example.com>
new CPAN modules on Mon Sep 25 2006 (Randal Schwartz)
pod - purpose of L<> directive <bol@adv.magwien.gv.at>
Re: pod - purpose of L<> directive <thepoet_nospam@arcor.de>
Re: String Pattern Matching: regex and Python regex doc <xah@xahlee.org>
Tk-perl2exe FileSelect error <lev.weissman@creo.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 24 Sep 2006 22:09:54 -0700
From: "Pam" <pamelapdh@aol.com>
Subject: Re: Checking for empty cell in Excel Spreadsheet
Message-Id: <1159160994.434575.77130@m73g2000cwd.googlegroups.com>
Hi
Can you tell me what I am doing wrong here. None of my cells are being
highlighted or wrote to it they are empty.
$filename ="CCB.txt";
open(FILE,">$filename") || die("Cannot Open File $filename : $!" );
print FILE $query_result->content;
print "File open ";
close (FILE);
$datestamp = strftime("%Y%m%d",localtime) ;
# Open the Comma Separated Variable file
open (CSVFILE, $filename) or die "$filename: $!";
# Create a new Excel workbook
my $workbook =
Spreadsheet::WriteExcel->new("3GSoftwareCCB_MeetingAgenda$datestamp.xls");
my $worksheet = $workbook->add_worksheet();
# Create a new CSV parsing object
my $csv = Text::CSV_XS->new;
# Row and column are zero indexed
my $row = 0;
while (<CSVFILE>) {
if ($csv->parse($_)) {
my @Fld = $csv->fields;
my $col = 0;
foreach my $token (@Fld) {
$worksheet->write($row, $col, $token);
$col++;
}
$row++;
if ($row > 1){
$count = $count + 1;
$total = $count;
}
}
else {
my $err = $csv->error_input;
print "Text::CSV_XS parse() failed on argument: ", $err, "\n";
}
}
print "Adding sheet1\n";
print "Now will format .xls file\n";
#Holding Variables for mailing list
$Name1 = '3gccbhst@motorola.com';
# Add a Format
$format = $workbook->add_format();
$format->set_text_wrap();
$format->set_bold();
$format->set_bg_color('51');
$format->set_border();
$format->set_bottom();
$format->set_top();
$format->set_left();
$format->set_right();
# The general syntax is write($row, $col, $token, $format)
# Write some formatted text
$col = 0;
$row = 0;
$worksheet->write(0, $col, "Identifier", $format,);
$worksheet->write(0, 1, "Team Comments", $format,);
$worksheet->write(0, 2, "Description", $format);
$worksheet->write(0, 3, "Status", $format);
$worksheet->write(0, 4, "Severity", $format);
$worksheet->write(0, 5, "Priority", $format);
$worksheet->write(0, 6, "CCBComments_encl", $format);
$worksheet->write(0, 7, "Primary-feature-team", $format);
$worksheet->write(0, 8, "Sub-feature-team", $format);
$worksheet->write(0, 9, "Project", $format);
$worksheet->write(0, 10,"Product", $format);
$worksheet->write(0, 11,"Products-targeted", $format);
$worksheet->write(0, 12,"Products-targed_del", $format);
$worksheet->write(0, 13,"Products-targetd_add", $format);
$worksheet->write(0, 14,"Program", $format);
$worksheet->write(0, 15,"Programs-targeted", $format);
$worksheet->write(0, 16,"Programs-targeted_del", $format);
$worksheet->write(0, 17,"Programs-targeted_add", $format);
$worksheet->write(0, 18, "CR-type", $format);
$worksheet->write(0, 19, "Software-version", $format);
$worksheet->write(0, 20, "Analysis-de", $format);
$worksheet->write(0, 21, "New-class", $format);
$worksheet->write(0, 22, "Forwarded-to", $format);
$worksheet->write(0, 23, "Duplicate-of", $format);
$worksheet->write(0, 24, "Duplicate-comments", $format);
$worksheet->write(0, 25, "TerminationComments_encl", $format);
$worksheet->write(0, 26, "Reason-for-terminating", $format);
$worksheet->write(0, 27, "Subsystem", $format);
$worksheet->write(0, 28, "Component", $format);
$worksheet->write(0, 29, "MA", $format);
print "Seting borders\n";
# get already active Excel application or open new
my $Excel = Win32::OLE->GetActiveObject('Excel.Application')
|| Win32::OLE->new('Excel.Application', 'Quit');
my $oBook = $Excel->Workbooks->Open("D:/Profiles/w8143c/My
Documents/Spreadsheet-WriteExcel-2.17/3GSoftwareCCB_MeetingAgenda$datestamp.xls");
#$row = 1;
my $col = 11;
print "Is this book geeting seen", $oBook, "\n";
#Tring to check for empty cell
#This looks at Sheet1 in the workbook
my $Sheet = $oBook->Worksheets(1);
my $cell = $Sheet->Cells($row,$col);
print "Is the sheet being seen", $Sheet, "\n";
for(my $row =1; $row <= $total ; $row++)
{
print " Will this give me my value $row $col",
$Sheet->Cells($row,$col), "\n";
print "where is the sheet " , $Sheet, "\n";
}
print $total, "\n";
print " Trying to check for empty cell \n";
#Trying to check for a empty cell
$row = 1;
$col = 11;
$format2 = $workbook->add_format();
$format2->set_bg_color('yellow');
while ($row <= $total)
{
$cell = $Sheet->Cells($row,$col);
if (undef $cell){
$worksheet->write($row, $col, "3G_Platform", $format2);
}
$row= $row + 1;
}
Thanks
Pamela
Bob Walton wrote:
> Pam wrote:
> ...
> > Yes I want to check each row in a particular column to see if anything
> > is there and then write to it. Is it possible you can give me a
> > snippet of that code for the defined function, This is the last piece
> > I have to fix
> ...
> > Pam
> ...
>
> Check the code in the first example in the documentation for the
> Win32::OLE module:
>
> perldoc Win32::OLE
>
> It shows you how to read the value of a cell, how to use the defined()
> function, and lots more. And, it goes without saying:
>
> perldoc -f defined
>
> --
> Bob Walton
> Email: http://bwalton.com/cgi-bin/emailbob.pl
------------------------------
Date: Mon, 25 Sep 2006 02:51:34 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: empty fields
Message-Id: <WuHRg.35708$E67.12181@clgrps13>
Eric Amick wrote:
> On Sun, 24 Sep 2006 12:18:11 +0200, Awkish <awk@hotmail.com> wrote:
>
>>I must parse files of this form:
>>
>>field1,,,field4,,field6,,,,,,
>>
>>That is, the fields of each line are separated by a comma, and the fields
>>can be empty.
>>
>>With awk I can do this:
>>
>>awk -F, '{print $6; print NF}'
>>
>>with the above line I get:
>>field6
>>12
>>and that's what I want
>>
>>How can I get the same result with Perl?
>>I tried:
>>
>>perl -F, 'print $F[5];print $#F+1'
>
> According to the description in perlrun (ahem), you need
>
> perl -an -F, "print $F[5],$#F+1"
>
> I tried it.
Are you really, really, *really* sure that you tried it?
> It works.
Prove it.
John
--
use Perl;
program
fulfillment
------------------------------
Date: 24 Sep 2006 22:41:59 -0700
From: "beowoof" <matt.toy@gmail.com>
Subject: Re: Federated CGI to CGI
Message-Id: <1159162919.261369.272030@m73g2000cwd.googlegroups.com>
axel@white-eagle.invalid.uk wrote:
> beowoof <matt.toy@gmail.com> wrote:
> > I have an interesting architecture that I'm trying to adapt a
> > configuration interface to.
>
> > [ major snip ]
>
> Do you have a Perl problem?
>
> If not, you are in the wrong newsgroup.
>
> Axel
Hiya,
I thought I made it pretty clear that I'm using Perl CGI as the
programming interface to achieve my desired outcome. In my example,
Perl is both the front end web page people go to and also the backend
CGI script engine to process the POST data and update the regional
server configurations.
------------------------------
Date: 24 Sep 2006 22:47:36 -0700
From: "beowoof" <matt.toy@gmail.com>
Subject: Re: Federated CGI to CGI
Message-Id: <1159163255.816454.172550@k70g2000cwa.googlegroups.com>
Hi!
Thanks for that. It is something that occurred to me as well. However
it is a bit "clunky" in that everything gets POST'd twice and the
user's browser session gets taken to the regional server in the end.
What I was hoping to achieve was have the user click "Submit" to a
change, then Javascript picks up the data, posts to the Perl script on
the configuraiton server using xmlhttprequest. The Perl script will
then *somehow* invoke the change on the regional servers.
Now, ideally I'd like the Perl script to call
http://www.region-web.bank.com/cgi-bin/update.pl directly. But I can't
think of a way this could be done programmatically... Can Perl pretend
to be a invoke URLs, capture the result and return it?
Mumia W. (reading news) wrote:
> On 09/24/2006 02:45 PM, beowoof wrote:
> > Hi all,
> >
> > I have an interesting architecture that I'm trying to adapt a
> > configuration interface to.
> >
> > At a high level, the architecture breaks down to:
> >
> > Central Web Instance:
> > - let's call it www.web-central.bank.com
> > Regional Web Servers:
> > - www.web-usa.bank.com, www.web-eur.bank.com and
> > www.web-asia.bank.com
> >
> > Now, ideally, users who want to configure each of the regional servers,
> > shouldn't have to actually log onto them locally. Instead, they would
> > log onto the central instance, select the region to modify and -- poof
> > -- the regional server is updated behind the scenes.
> >
> > Next up, I have no intention of using anything like frames,
> > configuration databases, pull methods, etc. I want to be able to
> > "push" the configuration out to the regional servers from the central
> > instance ad hoc.
> >
> > My first plan was to use xmlhttprequest to go off to a update.pl script
> > on the appropriate server and everything would be fine and dandy. Of
> > course, that didn't work. Calling a different web server causes
> > security warnings in IE and just won't work on Firefox.
> >
> > So what I'd like are ideas on how to approach this, or where I'm going
> > wrong. I specifically only want to stay within the web framework -
> > ideally CGI -> CGI calls. I could of course have daemon processes
> > (this is all Linux/Apache btw), SSH push, etc... All of which I don't
> > want to do. I had this wonderfully "clean" idea of central web scripts
> > calling regional web scripts.
> >
> > Thanks in advance.
> >
>
> Can you use a status 307 Temporary Redirect response to get the browser
> to post the form to one of the regional web sites?
>
> E.g.
> Browser (POST) --------> www.web-central.bank.com
>
> Browser <--------------- www.web-central.bank.com (307 Temporary
> Redirect, Location: www.web-eur.bank.com/...)
>
> Browser (POST) ---------> www.web-eur.bank.com
>
> HTTP Specification:
> ftp://ftp.isi.edu/in-notes/rfc2616.txt
>
> --
> paduille.4058.mumia.w@earthlink.net
------------------------------
Date: Mon, 25 Sep 2006 07:10:52 GMT
From: "Mumia W. (reading news)" <paduille.4058.mumia.w@earthlink.net>
Subject: Re: Federated CGI to CGI
Message-Id: <0iLRg.2265$o71.324@newsread3.news.pas.earthlink.net>
On 09/25/2006 12:47 AM, beowoof wrote:
> Mumia W. (reading news) wrote:
>> On 09/24/2006 02:45 PM, beowoof wrote:
>>> Hi all,
>>>
>>> I have an interesting architecture that I'm trying to adapt a
>>> configuration interface to.
>>>
>>> At a high level, the architecture breaks down to:
>>>
>>> Central Web Instance:
>>> - let's call it www.web-central.bank.com
>>> Regional Web Servers:
>>> - www.web-usa.bank.com, www.web-eur.bank.com and
>>> www.web-asia.bank.com
>>>
>>> Now, ideally, users who want to configure each of the regional servers,
>>> shouldn't have to actually log onto them locally. Instead, they would
>>> log onto the central instance, select the region to modify and -- poof
>>> -- the regional server is updated behind the scenes.
>>>
>>> Next up, I have no intention of using anything like frames,
>>> configuration databases, pull methods, etc. I want to be able to
>>> "push" the configuration out to the regional servers from the central
>>> instance ad hoc.
>>>
>>> My first plan was to use xmlhttprequest to go off to a update.pl script
>>> on the appropriate server and everything would be fine and dandy. Of
>>> course, that didn't work. Calling a different web server causes
>>> security warnings in IE and just won't work on Firefox.
>>>
>>> So what I'd like are ideas on how to approach this, or where I'm going
>>> wrong. I specifically only want to stay within the web framework -
>>> ideally CGI -> CGI calls. I could of course have daemon processes
>>> (this is all Linux/Apache btw), SSH push, etc... All of which I don't
>>> want to do. I had this wonderfully "clean" idea of central web scripts
>>> calling regional web scripts.
>>>
>>> Thanks in advance.
>>>
>> Can you use a status 307 Temporary Redirect response to get the browser
>> to post the form to one of the regional web sites?
>>
>> E.g.
>> Browser (POST) --------> www.web-central.bank.com
>>
>> Browser <--------------- www.web-central.bank.com (307 Temporary
>> Redirect, Location: www.web-eur.bank.com/...)
>>
>> Browser (POST) ---------> www.web-eur.bank.com
>>
>> HTTP Specification:
>> ftp://ftp.isi.edu/in-notes/rfc2616.txt
>>
>
> Hi!
>
> Thanks for that. It is something that occurred to me as well. However
> it is a bit "clunky" in that everything gets POST'd twice and the
> user's browser session gets taken to the regional server in the end.
>
> What I was hoping to achieve was have the user click "Submit" to a
> change, then Javascript picks up the data, posts to the Perl script on
> the configuraiton server using xmlhttprequest. The Perl script will
> then *somehow* invoke the change on the regional servers.
>
> Now, ideally I'd like the Perl script to call
> http://www.region-web.bank.com/cgi-bin/update.pl directly. But I can't
> think of a way this could be done programmatically... Can Perl pretend
> to be a invoke URLs, capture the result and return it?
>
Please bottom-post in this newsgroup. Here is a link to the posting
guidelines for this ng: http://www.augustmail.com/~tadmc/clpmisc.shtml
You can use the WWW::Mechanize module to allow a perl script to interact
with web pages as a browser would, or you can use WWw::Curl::easy to
post a form, or you can use LWP, or you can use create the POST request
using HTTP::Request and send it using Net::HTTP, or you can use the
"curl" external program to post the form, or you can use the "lynx"
external program to post, or you can use the "wget" external program, or ...
--
paduille.4058.mumia.w@earthlink.net
------------------------------
Date: 25 Sep 2006 00:16:29 -0700
From: "beowoof" <matt.toy@gmail.com>
Subject: Re: Federated CGI to CGI
Message-Id: <1159168589.499058.141300@i3g2000cwc.googlegroups.com>
> Please bottom-post in this newsgroup. Here is a link to the posting
> guidelines for this ng: http://www.augustmail.com/~tadmc/clpmisc.shtml
>
> You can use the WWW::Mechanize module to allow a perl script to interact
> with web pages as a browser would, or you can use WWw::Curl::easy to
> post a form, or you can use LWP, or you can use create the POST request
> using HTTP::Request and send it using Net::HTTP, or you can use the
> "curl" external program to post the form, or you can use the "lynx"
> external program to post, or you can use the "wget" external program, or ...
>
>
>
> --
> paduille.4058.mumia.w@earthlink.net
Very interesting... Not too sure about using external programs, but
you have given me some good ideas to work with.
Many thanks.
------------------------------
Date: Mon, 25 Sep 2006 08:03:35 +0100
From: Henry Law <news@lawshouse.org>
Subject: Re: Help with "require" and importing constants
Message-Id: <1159167812.25324.0@proxy00.news.clara.net>
Brian McCauley wrote:
> Henry Law wrote:
>> The module exports a set of constants (ARCHIVE being my example), but
>> not, apparently, when "require" is used. How do I code this simple thing?
>
> Simply change ARCHIVE to Win32::File::ARCHIVE().
>
> i.e. full name, because require() doesn't call import() and make it
> explicit to the compiler that you are talking about a function because
> it can't know if you didn't load the module during the compilation
> phase.
Thanks, Brian. I tried almost every combination except this one and the
correct use of "import" as you've described below. Works fine.
But follow-up questions if I may. ARCHIVE isn't a function, it's a
constant. So (a) why can I refer to it as a function like this, (b) why
does that give the required behaviour, and (c) do I infer correctly that
constants and functions have the same namespace, and that Win32::File
could not therefore have a function called ARCHIVE() as well as a constant?
> You get the error because you are trying to rely on information to
> travelling backwards in time. (A technique also known as the
> "temporally global variable"). You want the compiler to know (during
> the compilation phase) that the bare word ARCHIVE (without a ()) is a
> to be compiled as a function call
As I say, this equivalence of functions calls and constants is very
confusing ...
> but you are not loading the module
> that declares that function until _after_ the compilation phase.
> If you do call Win32::File->import then you can write ARCHIVE() rather
> than needing to say Win32::File::ARCHIVE().
--
Henry Law <>< Manchester, England
------------------------------
Date: Mon, 25 Sep 2006 07:33:49 GMT
From: "Mumia W. (reading news)" <paduille.4058.mumia.w@earthlink.net>
Subject: Re: Help with "require" and importing constants
Message-Id: <xDLRg.1110$Y24.736@newsread4.news.pas.earthlink.net>
On 09/25/2006 02:03 AM, Henry Law wrote:
>
> [...] ARCHIVE isn't a function, it's a
> constant. So (a) why can I refer to it as a function like this, (b) why
> does that give the required behaviour, and (c) do I infer correctly that
> constants and functions have the same namespace, and that Win32::File
> could not therefore have a function called ARCHIVE() as well as a constant?
> [...]
In Perl, generally constants are implemented as functions, e.g.
sub DATA_MAX { 100000 }
--
paduille.4058.mumia.w@earthlink.net
------------------------------
Date: Mon, 25 Sep 2006 07:58:29 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: Help with "require" and importing constants
Message-Id: <F_LRg.31344$bf5.2199@edtnps90>
Mumia W. (reading news) wrote:
> On 09/25/2006 02:03 AM, Henry Law wrote:
>>
>> [...] ARCHIVE isn't a function, it's a constant. So (a) why can I
>> refer to it as a function like this, (b) why does that give the
>> required behaviour, and (c) do I infer correctly that constants and
>> functions have the same namespace, and that Win32::File could not
>> therefore have a function called ARCHIVE() as well as a constant?
>> [...]
>
> In Perl, generally constants are implemented as functions, e.g.
> sub DATA_MAX { 100000 }
See the "Constant Functions" section of perlsub. The correct way is:
sub DATA_MAX () { 100000 }
John
--
use Perl;
program
fulfillment
------------------------------
Date: Mon, 25 Sep 2006 04:42:08 GMT
From: merlyn@stonehenge.com (Randal Schwartz)
Subject: new CPAN modules on Mon Sep 25 2006
Message-Id: <J64t28.qvF@zorch.sf-bay.org>
The following modules have recently been added to or updated in the
Comprehensive Perl Archive Network (CPAN). You can install them using the
instructions in the 'perlmodinstall' page included with your Perl
distribution.
Bundle-CPAN-1.853
http://search.cpan.org/~andk/Bundle-CPAN-1.853/
Bundle to optmize the behaviour of CPAN.pm
----
CMS-MediaWiki-0.8009
http://search.cpan.org/~retoh/CMS-MediaWiki-0.8009/
Perl extension for creating and updating MediaWiki pages
----
CMS-MediaWiki-0.8010
http://search.cpan.org/~retoh/CMS-MediaWiki-0.8010/
Perl extension for creating and updating MediaWiki pages
----
CPAN-Reporter-0.20
http://search.cpan.org/~dagolden/CPAN-Reporter-0.20/
Provides Test::Reporter support for CPAN.pm
----
Cairo-1.01
http://search.cpan.org/~tsch/Cairo-1.01/
Perl interface to the cairo library
----
Geo-Postcodes-0.31
http://search.cpan.org/~arne/Geo-Postcodes-0.31/
Base class for the Geo::Postcodes::* modules
----
Geo-Postcodes-DK-0.31
http://search.cpan.org/~arne/Geo-Postcodes-DK-0.31/
Danish postcodes with associated information
----
Geo-Postcodes-NO-0.31
http://search.cpan.org/~arne/Geo-Postcodes-NO-0.31/
Norwegian postcodes with associated information
----
Module-Build-Convert-0.34
http://search.cpan.org/~schubiger/Module-Build-Convert-0.34/
Makefile.PL to Build.PL converter
----
Module-Manifest-0.01
http://search.cpan.org/~adamk/Module-Manifest-0.01/
----
Module-Math-Depends-0.01
http://search.cpan.org/~adamk/Module-Math-Depends-0.01/
Convenience object for manipulating module dependencies
----
Module-ScanDeps-0.65
http://search.cpan.org/~smueller/Module-ScanDeps-0.65/
Recursively scan Perl code for dependencies
----
Module-ScanDeps-0.66
http://search.cpan.org/~smueller/Module-ScanDeps-0.66/
Recursively scan Perl code for dependencies
----
Net-DNS-Codes-0.09
http://search.cpan.org/~miker/Net-DNS-Codes-0.09/
collection of C library DNS codes
----
RPM-Specfile-1.51
http://search.cpan.org/~chipt/RPM-Specfile-1.51/
Perl extension for creating RPM Specfiles
----
RPM2-0.67
http://search.cpan.org/~chipt/RPM2-0.67/
Perl bindings for the RPM Package Manager API
----
TM-1.18
http://search.cpan.org/~drrho/TM-1.18/
Topic Maps, Base Class
----
Test-Trap-0.000017
http://search.cpan.org/~ebhanssen/Test-Trap-0.000017/
Trap exit codes, exceptions, output, etc.
----
WWW-IndexParser-0.5.1
http://search.cpan.org/~jeb/WWW-IndexParser-0.5.1/
Fetch and parse the directory index from a web server
----
WebService-ISBNDB-0.20
http://search.cpan.org/~rjray/WebService-ISBNDB-0.20/
----
XML-LibXML-1.61
http://search.cpan.org/~pajas/XML-LibXML-1.61/
Perl Binding for libxml2
----
XML-LibXSLT-1.61
http://search.cpan.org/~pajas/XML-LibXSLT-1.61/
Interface to the gnome libxslt library
----
subatom-0.09
http://search.cpan.org/~hdm/subatom-0.09/
produce an atom feed from subversion commits
If you're an author of one of these modules, please submit a detailed
announcement to comp.lang.perl.announce, and we'll pass it along.
This message was generated by a Perl program described in my Linux
Magazine column, which can be found on-line (along with more than
200 other freely available past column articles) at
http://www.stonehenge.com/merlyn/LinuxMag/col82.html
print "Just another Perl hacker," # the original
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
------------------------------
Date: Mon, 25 Sep 2006 09:04:04 +0200
From: "Ferry Bolhar" <bol@adv.magwien.gv.at>
Subject: pod - purpose of L<> directive
Message-Id: <1159167845.138399@proxy.dienste.wien.at>
Hello,
I currently try to write some documentation in pod. This documentation
is subject for later use with perldoc and I want to generate HTML
documents as well (using pod2html).
In the documentation, I use L<> to create links to some topics within
the same document:
=head4 System Services
and later:
...see also the chapter L<about system services|/system_services>.
This works as expected.
Sometimes in the doc, I also want to reference to other perl
documentation, so I write
...for more info, see L<perlref>.
When running this through pod2html, it tells me
sysserv.pod: cannot resolve perlref in paragraph 204.
I'd guess that pod2html would expect to find a perlref.html
somewhere? But there is no such document, there is a perlref.pod
only.
What does the above message mean? Does it mean that I cannot
use this form of L<> within HTML documents? Or in other words:
How the L<> directive is used to reference documentation outside
of the current one? Does it make sense to use it in this way? (In
man/nroff documents, it is useless because there is no way to navigate,
and in HTML documents, the entire documentation must exist in HTML)
So when and how make "See L<perlref>" sense?
Greetings, Ferry
--
Ing Ferry Bolhar
Magistrat der Stadt Wien - MA 14
A-1010 Wien
E-Mail: bol@adv.magwien.gv.at
------------------------------
Date: Mon, 25 Sep 2006 10:05:42 +0200
From: Christian Winter <thepoet_nospam@arcor.de>
Subject: Re: pod - purpose of L<> directive
Message-Id: <45178c33$0$5148$9b4e6d93@newsspool1.arcor-online.net>
Ferry Bolhar wrote:
> Hello,
>
> I currently try to write some documentation in pod. This documentation
> is subject for later use with perldoc and I want to generate HTML
> documents as well (using pod2html).
>
> In the documentation, I use L<> to create links to some topics within
> the same document:
>
> =head4 System Services
>
> and later:
>
> ...see also the chapter L<about system services|/system_services>.
>
> This works as expected.
>
> Sometimes in the doc, I also want to reference to other perl
> documentation, so I write
>
> ...for more info, see L<perlref>.
>
> When running this through pod2html, it tells me
>
> sysserv.pod: cannot resolve perlref in paragraph 204.
>
> I'd guess that pod2html would expect to find a perlref.html
> somewhere? But there is no such document, there is a perlref.pod
> only.
As I wrote a few days ago on the same question in the German group,
you have to set --podroot and --podpath. Additionally, you may have
to set --libpods to include documents with linkable items.
pod2html doesn't search the standard perl include paths.
pod2html obviously only looks into pod files to resolve links, it
doesn't care for pre-existing html files.
-Chris
------------------------------
Date: 24 Sep 2006 20:15:30 -0700
From: "Xah Lee" <xah@xahlee.org>
Subject: Re: String Pattern Matching: regex and Python regex documentation
Message-Id: <1159154130.615032.194810@i3g2000cwc.googlegroups.com>
Xah Lee wrote:
=C2=AB the Python regex documentation is available at:
http://xahlee.org/perl-python/python_re-write/lib/module-re.html ...=C2=BB
J=C3=BCrgen Exner wrote:
=C2=ABYeah, sure, and the Perl regex documentation is available at 'perldoc
perlre'. So what? Is that anything new or surprising?=C2=BB
It is of interest and new, because it is a rewrite of Python's
documentation. And it is of interest to Perlers, because Perl and
Python uses the same regex syntax.
The purpose of this rewrite, is to fix Python's lousy documentation,
and to demonstrate a style of technical writing, where precision and
clarity is the prime directive.
It demonstrates a style of documentation, where the philosophy is
task-oriented and uses examples sans misgivings. (in this aspect, it
is similar to the style of Perl's official documentation.)
Further, the exposition style focuses on the manifestation of the
language elements, as a piece of mathematics, a style often found in
functional language's documentations. It is opposed to, treating the
language as a state machine or compiler engine, which are often
necessarily the approach of imperative languages's documentations.
This project was undertaken as a response to a challenge put forth to
me with a $100 reward, on 2005-04-12 on comp.lang.python newsgroup. I
never received the due reward.
Thanks.
Xah
xah@xahlee.org
=E2=88=91 http://xahlee.org/
------------------------------
Date: 25 Sep 2006 01:10:45 -0700
From: "MoshiachNow" <lev.weissman@creo.com>
Subject: Tk-perl2exe FileSelect error
Message-Id: <1159171845.811511.98440@d34g2000cwd.googlegroups.com>
HI,
My following code runs fine with Activestate on Windows:
$FSref = $mw->FileSelect(-directory => "d:\\",-filter => "*.zip");
$filename1 = $FSref->Show;
However fails after perl2exe compilation.
Appreciate any advise.
Tk::Error:
PLEASE SEE THE PERL2EXE USER MANUAL UNDER "Can't locate somemodule.pm
in @INC"
FOR AN EXPLANATION OF THE FOLLOWING MESSAGE:
Can't locate utf8.pm in @INC (@INC contains: PERL2EXE_STORAGE
D:\Documents and Settings\Ad
ministrator\Desktop\test E:\Temp\1/p2xtmp-2568) at
PERL2EXE_STORAGE/Carp/Heavy.pm line 55.
BEGIN failed--compilation aborted.
Tk callback for .fileselect.dir_entry
Tk callback for .fileselect.file_entry
Tk callback for .fileselect.dir_list
Tk callback for .fileselect.dir_list.ysbslice
Tk callback for .fileselect.dir_list.ysbslice.corner
Tk callback for .fileselect.frame
Tk callback for .fileselect.file_list
Tk callback for .fileselect.file_list.ysbslice
Tk callback for .fileselect.file_list.ysbslice.corner
Tk callback for .fileselect.dialog.top
Tk callback for .fileselect.dialog.bottom
Tk::Derived::configure at PERL2EXE_STORAGE/Tk/Derived.pm line 306
Tk::Widget::new at PERL2EXE_STORAGE/Tk/Widget.pm line 205
Tk::Widget::__ANON__ at PERL2EXE_STORAGE/Tk/Widget.pm line 256
Tk::Derived::Component at PERL2EXE_STORAGE/Tk/Derived.pm line 502
Tk::FileSelect::Populate at PERL2EXE_STORAGE/Tk/FileSelect.pm line 233
Tk::Derived::InitObject at PERL2EXE_STORAGE/Tk/Derived.pm line 477
Tk::Widget::new at PERL2EXE_STORAGE/Tk/Widget.pm line 203
Tk::Widget::__ANON__ at PERL2EXE_STORAGE/Tk/Widget.pm line 256
main::recov at D:\Documents and
Settings\Administrator\Desktop\test\rehost.exe line 997
Tk callback for .button1
Tk::__ANON__ at PERL2EXE_STORAGE/Tk.pm line 252
Tk::Button::butUp at PERL2EXE_STORAGE/Tk/Button.pm line 111
<ButtonRelease-1>
(command bound to event)
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 9762
***************************************