🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #6043

Re: Harto de Perl-CGI

#6043
From: Samuel
Date: Mon, 18 Aug 2003 10:32
75 lines
3849 bytes
El Thu, 14 Aug 2003 16:20:15 +0200, Count Zero 
 <mark@l3jane.net> dijo:
> Aunque llevo ya un tiempo haciendo mis programillas y scripts en perl (y
> retocando algunos que pasan por mis manos), sin ning�n problema y un �xito
> bastante satisfactorio (IMHO), no hay forma de que me funcionen los
> scripts Perl-CGI que hago.
> 
> Mi intenci�n:
> 
> Hacer un script CGI con perl, que devuelve al servidor una p�gina HTML con
> el contenido de un fichero determinado. Al final de la misma pagina hay
> un formulario con ACTION al mismo script que permite a�adir una nueva
> l�nea al fichero en question.
> 
[....] 
> # leo los parametros del formulario 'date' y 'event'
> my $date=param("date");
> my $event=param("event");
> 
> Al ejecutar la prueba 'cat fichero | ./script-cgi > ~/page.html'
> 
> Me suelta esto:
> 
> Name "main::end_table" used only once: possible typo 
> 	at ./eventlog line 109.
> Name "main::start_table" used only once: possible typo 
> 	at ./eventlog line 103.
> Use of uninitialized value in concatenation (.) or string at ./eventlog
> line 75.
> Use of uninitialized value in concatenation (.) or string at ./eventlog line 75.
> print() on unopened filehandle start_table at ./eventlog line 103.
> print() on unopened filehandle end_table at ./eventlog line 109.
> 
> NOTAS:
> - Genera correctamente la pagina page.html, aunque sin la nueva l�nea.
> - En la lin. 109 y 103 se queja de un print on unopened file y de un
> 'possible typo', en estas l�nieas hay respectivamente un 
> 
> print start_table();
> print end_table();
> 
> Que no generan el <table> ni el </table> a�n habiendo puesto el "use CGI
> qw(:standard);

�Puede ser por �sto?:
----
With a few exceptions (described below), start_*tag_name* and
end_*tag_name* functions are not generated automatically when you *use
CGI*. However, you can specify the tags you want to generate *start/end*
functions for by putting an asterisk in front of their name, or,
alternatively, requesting either "start_*tag_name*" or "end_*tag_name*"
in the import list.

Example:

  use CGI qw/:standard *table start_ul/;
----

Yo dir�a que s� porque ese: 
Name "main::end_table" used only once: possible typo 
	at ./eventlog line 109.
indica que no es capaz de encontrar la funci�n end_table()(de hecho lo
tiene en la tabla de s�mbolos de main::). Probablemente ni siquiera
existen esas funciones como tal sino que son generadas din�micamente
(puede que no, simplemente estoy adivinando). 

Pu�s eso, viene en el "fine" manual ;-)

Un saludo

Samuel

-- 
Samuel Mo�ux Salvador
PGP Key pgp.rediris.es    -----         KeyID 0x822583C2
Technical Details
Message-ID: <slrnbk1ap6.qn.444398NOSPAM@tizona.no-ip.org>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!feed.news.nacamar.de!fu-berlin.de!nsnmpen1-lo.nuria.telefonica-data.net!nsnmrro2-lo.nuria.telefonica-data.net!not-for-mail
References: <pan.2003.08.14.14.20.14.830166@l3jane.net>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,5de78cdd9c81965e
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2003-08-18 03:32:01 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!feed.news.nacamar.de!fu-berlin.de!nsnmpen1-lo.nuria.telefonica-data.net!nsnmrro2-lo.nuria.telefonica-data.net!not-for-mail
From: Samuel <444398NOSPAM@celes.unizar.es>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Harto de Perl-CGI
Date: Mon, 18 Aug 2003 10:32:00 +0000 (UTC)
Organization: Telefonica Data Espagna
Lines: 75
Message-ID: <slrnbk1ap6.qn.444398NOSPAM@tizona.no-ip.org>
References: <pan.2003.08.14.14.20.14.830166@l3jane.net>
NNTP-Posting-Host: 165.red-80-25-246.pooles.rima-tde.net
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: nsnmrro2-gest.nuria.telefonica-data.net 1061202720 16518 80.25.246.165 (18 Aug 2003 10:32:00 GMT)
X-Complaints-To: usenet@nsnmrro2-gest.nuria.telefonica-data.net
NNTP-Posting-Date: Mon, 18 Aug 2003 10:32:00 +0000 (UTC)
User-Agent: slrn/0.9.7.4 (FreeBSD)