[27811] in Perl-Users-Digest
Perl-Users Digest, Issue: 9175 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Apr 19 14:05:48 2006
Date: Wed, 19 Apr 2006 11:05:08 -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 Wed, 19 Apr 2006 Volume: 10 Number: 9175
Today's topics:
Re: Finding unused variables in a Perl script <rvtol+news@isolution.nl>
Re: Finding unused variables in a Perl script (Anno Siegel)
Re: Finding unused variables in a Perl script <rvtol+news@isolution.nl>
How to find uploaded data size from content-length <no@thanks.com>
Re: How to find uploaded data size from content-length <john@castleamber.com>
Re: How to find uploaded data size from content-length xhoster@gmail.com
Re: How to find uploaded data size from content-length <no@thanks.com>
Re: How to find uploaded data size from content-length <no@thanks.com>
Re: How to find uploaded data size from content-length <john@castleamber.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Wed, 19 Apr 2006 17:33:29 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Finding unused variables in a Perl script
Message-Id: <e25scp.17s.1@news.isolution.nl>
Anno Siegel schreef:
> Dr.Ruud:
>> Matt Garrish:
>>> [find all declared but unused variables]
>>> can't be done, to my knowledge anyway.
>>
>> It may be possible for a source that doesn't use eval.
>
> That's a small set. Every program that "use"s something uses eval.
I see some light between my "source" and your "program", but please
explain.
Does a "use strict" involve "eval"? I skimmed "use()" and "require()"
and "perlmod" and such, but didn't find a clue.
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: 19 Apr 2006 15:54:07 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Finding unused variables in a Perl script
Message-Id: <4an4ovFsrdh2U2@news.dfncis.de>
Dr.Ruud <rvtol+news@isolution.nl> wrote in comp.lang.perl.misc:
> Anno Siegel schreef:
> > Dr.Ruud:
> >> Matt Garrish:
>
> >>> [find all declared but unused variables]
> >>> can't be done, to my knowledge anyway.
> >>
> >> It may be possible for a source that doesn't use eval.
> >
> > That's a small set. Every program that "use"s something uses eval.
>
> I see some light between my "source" and your "program", but please
> explain.
>
> Does a "use strict" involve "eval"?
Yes, the first time it is used.
> I skimmed "use()" and "require()"
> and "perlmod" and such, but didn't find a clue.
All code interpretation in Perl is through eval. The source code is
read into a string and eval'ed.
Use of a variable can be hidden in a string which is to be eval'ed or
another source which is to be use'd. In both cases it's invisible to
a variable tracing program.
Anno
--
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
------------------------------
Date: Wed, 19 Apr 2006 18:49:17 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Finding unused variables in a Perl script
Message-Id: <e261ak.1h4.1@news.isolution.nl>
Anno Siegel schreef:
> Dr.Ruud:
>> Does a "use strict" involve "eval"?
>
> Yes, the first time it is used.
But is that the same (main?) instance of eval() that interprets the
source that contains the use() (like with #include in C), or is it a new
(child?) eval()? A require() could just do some basic checks, and hand
over the (pre-parsed) source when successful.
The Subject is still "Finding unused variables", I still assume it is
practical.
> All code interpretation in Perl is through eval. The source code is
> read into a string and eval'ed.
*yawn* <g>
> Use of a variable can be hidden in a string which is to be eval'ed or
> another source which is to be use'd. In both cases it's invisible to
> a variable tracing program.
That's what I think I said, several postings ago.
--
Affijn, Ruud
"Gewoon is een tijger."
------------------------------
Date: Wed, 19 Apr 2006 17:14:34 +0200
From: Asterbing <no@thanks.com>
Subject: How to find uploaded data size from content-length
Message-Id: <MPG.1eb072447a1a70fc9897f8@news.tiscali.fr>
Considering a multipart/form-data form, is there a formula to calculate
the size of an uploaded file from within $ENV{'CONTENT_LENGTH'} which
represent the size of the entire data in STDIN (including all name/value
pairs, boundary between parts, content-disposition & type lines, some
blank lines) ?
------------------------------
Date: 19 Apr 2006 15:43:29 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: How to find uploaded data size from content-length
Message-Id: <Xns97AA6D15AEC7Fcastleamber@130.133.1.4>
Asterbing <no@thanks.com> wrote:
> Considering a multipart/form-data form, is there a formula to calculate
> the size of an uploaded file from within $ENV{'CONTENT_LENGTH'} which
> represent the size of the entire data in STDIN (including all name/value
> pairs, boundary between parts, content-disposition & type lines, some
> blank lines) ?
Why not -s filename assuming you store it in a file system?
--
John Bokma Freelance software developer
&
Experienced Perl programmer: http://castleamber.com/
------------------------------
Date: 19 Apr 2006 15:33:20 GMT
From: xhoster@gmail.com
Subject: Re: How to find uploaded data size from content-length
Message-Id: <20060419114637.129$Vc@newsreader.com>
Asterbing <no@thanks.com> wrote:
> Considering a multipart/form-data form, is there a formula to calculate
> the size of an uploaded file from within $ENV{'CONTENT_LENGTH'} which
> represent the size of the entire data in STDIN (including all name/value
> pairs, boundary between parts, content-disposition & type lines, some
> blank lines) ?
No.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Wed, 19 Apr 2006 18:00:02 +0200
From: Asterbing <no@thanks.com>
Subject: Re: How to find uploaded data size from content-length
Message-Id: <MPG.1eb07cee31d34929897fd@news.tiscali.fr>
In article <Xns97AA6D15AEC7Fcastleamber@130.133.1.4>,
john@castleamber.com says...
> Why not -s filename assuming you store it in a file system?
>
Because I would like to avoid too big files
------------------------------
Date: Wed, 19 Apr 2006 18:01:06 +0200
From: Asterbing <no@thanks.com>
Subject: Re: How to find uploaded data size from content-length
Message-Id: <MPG.1eb07d3123af6ebe9897fe@news.tiscali.fr>
In article <20060419114637.129$Vc@newsreader.com>, xhoster@gmail.com
says...
>
> No.
>
Why ?
------------------------------
Date: 19 Apr 2006 17:35:53 GMT
From: John Bokma <john@castleamber.com>
Subject: Re: How to find uploaded data size from content-length
Message-Id: <Xns97AA8023D74CDcastleamber@130.133.1.4>
Asterbing <no@thanks.com> wrote:
> In article <Xns97AA6D15AEC7Fcastleamber@130.133.1.4>,
> john@castleamber.com says...
>> Why not -s filename assuming you store it in a file system?
>
> Because I would like to avoid too big files
Ok, so your question actually is: how do I avoid the uploading of big
files:
$CGI::POST_MAX
If set to a non-negative integer, this variable puts a ceiling on the
size of POSTings, in bytes. If CGI.pm detects a POST that is greater than
the ceiling, it will immediately exit with an error message. This value
will affect both ordinary POSTs and multipart POSTs, meaning that it
limits the maximum size of file uploads as well. You should set this to a
reasonably high value, such as 1 megabyte.
(documentation of CGI.pm, Avoiding Denial of Service Attacks)
--
John Bokma Freelance software developer
&
Experienced Perl programmer: http://castleamber.com/
------------------------------
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 9175
***************************************