On Fri, Nov 19, 1999 at 10:10:07AM -0800, Jeffrey Baker wrote:
>
> if (defined @foo_in) {
Generally using defined() on aggregates is a bad idea.
Tim.
On Fri, 19 Nov 1999, Jeffrey Baker wrote:
> I don't care whether Perl has allocate memory or not. All I care about
> is whether or not there are any defined entries in the list, which I
> think is most clearly expressed as 'if (defined $list[0])'. What is
> more clear than that? 'if (@list)' c
Randal L. Schwartz wrote:
> "if (@foo) {...}" is *idiomatic* Perl for "are there any elements in
> @foo, and if so, do this". If you don't understand the idioms, please
> choose a more familiar language. :)
Don't you think this is a rather nasty response, smiley notwithstanding? Normally I
enj
On Fri, 19 Nov 1999, Matt Sergeant wrote:
> httpd -X
good production solution.
> "Jeffrey" == Jeffrey Baker <[EMAIL PROTECTED]> writes:
Jeffrey> Yeah. I guess the reason I do the latter is b/c I want the code to
Jeffrey> reflect what I am actually trying to test. I don't really want to test
Jeffrey> the trueness of @foo, I want to test for it's existence. But in perl
Ken Williams wrote:
> Are you sure? I'm still not sure you understand about defined(@list). It
> actually tests whether Perl has allocated memory for the structure, not whether
> the structure has ever been used or anything like that. And even the present
> behavior may change without notice.
[EMAIL PROTECTED] (Jeffrey Baker) wrote:
>Cliff Rayman wrote:
>>
>> `perldoc -f defined` yields a couple of sentences:
>>
>> You may also use C to check whether a subroutine exists, by
>> saying C without parentheses. On the other hand, use
>> of C upon aggregates (hashes and arrays) is not gua
On Fri, 19 Nov 1999, Jeffrey Baker wrote:
> 1) Visit /yoururl
> 2) Visit /yoururl?foo=bar&foo=baz
> 3) Visit /yoururl as many times as you have Apache child processes
httpd -X
--
Details: FastNet Software Ltd - XML, Perl, Databases.
Tagline: High Performance Web Solutions
Web Sites: http://co
Cliff Rayman wrote:
>
> `perldoc -f defined` yields a couple of sentences:
>
> You may also use C to check whether a subroutine exists, by
> saying C without parentheses. On the other hand, use
> of C upon aggregates (hashes and arrays) is not guaranteed to
> produce intuitive results, and shou
`perldoc -f defined` yields a couple of sentences:
You may also use C to check whether a subroutine exists, by
saying C without parentheses. On the other hand, use
of C upon aggregates (hashes and arrays) is not guaranteed to
produce intuitive results, and should probably be avoided.
why not us
I should have mentioned in this bug report that the problem only occurs
when you call $r->param in a list context. Everything is fine in a
scalar context. For that reason I suspect this little bit of code:
sub param {
my $self = shift;
my($name, $value) = @_;
my $tab = $self->parms;
Hi,
I haven't had time to really hunt this bug to its source, but here is
the report anyway.
Take as an example the URI /program?foo=bar&foo=baz&foo=quux
In program, which uses libapreq, I have code which looks like this:
my @foo_in = $r->param('foo');
@foo_in should not be defined if there a
12 matches
Mail list logo