Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [Paul] bug in dir Converter

Quote Reply
Re: [Paul] bug in dir Converter In reply to
Paul,
Thanks again for your advices. But I reasoned well my answers in my last post.
As well as these:
Quote:
It is not needed, you should use something like the following:
perl -c -I/path/to/admin/directory
Yes, theoritically that may be possible, but note that I don't use perl command line for my developments.
I use a UltraEdit programming editor, which helps me a lot in my development. It has a Tool which makes possible to run compilers, interpreters, and can also include the file Path, but only with backslashes. No path with forward slashes available.
So currently the perl -I option is not usable for me.

Quote:
GT::Dumper
We already discussed that, no reason to dispute again about it.

Quote:
>>You are right, that they could be declared in one step.
>But usage of 13 "my" declarations does simply not matter in fact of the speed.
>Yes it does.
Paul, please do the profiling of my plugin, ok?
Then, when you have some proofs, come back and tell me the exact results, and prove your right!
(Note! I said Profiling, not Benchmarking!)
Until that time don't talk into the air...

Ask any professional programmer about optimizations.
Syntactical & aesthethic optimizations are mostly just waste of the time.
The reason for a working code change:
1) add new feature
2) correct bug
3) add comments to make it self descriptive or make it clear to understand for later developments
4) code optimizations, usually for speed (after profiling!!!)

Quote:
There is a difference in precedence between "not" and "!" - it's not a question of programmingstyle.
I explained that, and you can try safely.
Try this code:
Code:
my @foo = ('a','b','c');
my @bar = ('a','b','c');
print "Content-Type: text/plain\n\n";
(scalar @foo eq scalar @bar) ? (print 'equal') : (print 'NOT equal');
The example will display you 'equal'.
As I wrote, in case we use 'eq' or 'ne', the numbers are converted to strings, then compared.
The example above shows I'm right.
I don't say 'eq' or 'ne' is correct to use for numbers, but works well without problem.
Also BTW read perdoc perldata:
Quote:
Scalars aren't necessarily one thing or another. There's no place to declare a scalar variable to be of type ``string'', type ``number'', type ``reference'', or anything else. Because of the automatic conversion of scalars, operations that return scalars don't need to care (and in fact, cannot care) whether their caller is looking for a string, a number, or a reference. Perl is a contextually polymorphic language whose scalars can be strings, numbers, or references (which includes object

Quote:
Same as above, with the addition, that there are NO number comparisions using 'eq'!!!
You meant this code part?: $IN->param("step1") eq "1" .... also in html sourse: <INPUT TYPE="CHECKBOX" NAME="step1" VALUE="1">
All input parameters you get from the form are strings, so you statement is simply not true.
So it causes NO problems.

See my answer above.
Paul, if once you write bullshit, at least don't repeat it :)
I would use $IN->param("step1") eq "step1", then your comment would not have any base at all.
But even if I pass value "1", is valid to use 'eq', since 1 is understood my interpreter as string, when compared with 'eq'...

Quote:
You example doesn't prove anything as you aren't even using any blocks
Uh, you should not stick to your wrong knowledge. You should read the perldoc first.
In the code I listed, not the block environment matters (since we assume it is in module file), but the fact that the plugin is a module (file).

Quote:
So your comment was NOT valid in CGI mode. Unfortunately under mod_perl the my() declaration usage on file level will not work if it's used under mod_perl. The mod_perl is the only reason to correct it, and avoid usage of my() declarations on file level.

Sorry, I'm afraid you are incorrect again. It has nothing to do with mod_perl.
Check my comments above about file level my() usage.
Therefore is very likely that mod_perl is affected by file level my() usage. That's why I move them to function level.

Quote:
I didn't have to do hundreds of test...a quick scan through the code was enough to spot several potential problems.
Again. There were only 1 potential problems in your list with 10 items, the mod_perl compatibility.
Also there was the 1 bug, what Yogi discovered: usage of 'category' instead 'Category'.

Quote:
If you choose not to correct them then only yourself and the people using your plugins will lose out in the end...
Nobody will lose anything! Please don't mislead the users!
As above I described, there was 1 bug, and 1 potential problem!
Both will be solved in the v1.0.5 bugfix version!
Will be released, when was tested to work.

Quote:
I am just trying to assist you :)
You are always welcome to assist my developments. Wink

Quote:
I do think though you need to view the perldocs
I did read the docs. The one who need the docs is you. Wink

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Subject Author Views Date
Thread; hot thread bug in dir Converter ridesworld 9968 Mar 12, 2003, 8:07 AM
Post; hot thread Re: [ridesworld] bug in dir Converter
Andy 9660 Mar 12, 2003, 8:17 AM
Thread; hot thread Re: [ridesworld] bug in dir Converter
Paul 9683 Mar 12, 2003, 8:47 AM
Thread; hot thread Re: [Paul] bug in dir Converter
webmaster33 9553 Mar 13, 2003, 4:55 AM
Thread; hot thread Re: [webmaster33] bug in dir Converter
Paul 7273 Mar 13, 2003, 5:15 AM
Thread; hot thread Re: [Paul] bug in dir Converter
webmaster33 7278 Mar 13, 2003, 7:07 AM
Thread; hot thread Re: [webmaster33] bug in dir Converter
Paul 7280 Mar 13, 2003, 7:14 AM
Thread; hot thread Re: [Paul] bug in dir Converter
webmaster33 7192 Mar 13, 2003, 8:13 AM
Post; hot thread Re: [webmaster33] bug in dir Converter
klauslovgreen 7209 Mar 13, 2003, 8:40 AM
Thread; hot thread Re: [webmaster33] bug in dir Converter
Paul 7252 Mar 13, 2003, 9:03 AM
Thread; hot thread Re: [Paul] bug in dir Converter
webmaster33 7644 Mar 13, 2003, 9:29 AM
Post; hot thread Re: [webmaster33] bug in dir Converter
Paul 7202 Mar 13, 2003, 9:32 AM
Thread; hot thread Re: [ridesworld] bug in dir Converter
webmaster33 9689 Mar 12, 2003, 10:12 AM
Thread; hot thread Re: [webmaster33] bug in dir Converter
ridesworld 9672 Mar 12, 2003, 12:29 PM
Thread; hot thread Re: [ridesworld] bug in dir Converter
Paul 9777 Mar 12, 2003, 12:48 PM
Post; hot thread Re: [Paul] bug in dir Converter
webmaster33 9601 Mar 12, 2003, 1:08 PM
Thread; hot thread Re: [ridesworld] bug in dir Converter
webmaster33 9674 Mar 12, 2003, 1:11 PM
Thread; hot thread Re: [webmaster33] bug in dir Converter
yogi 9694 Mar 12, 2003, 1:19 PM
Thread; hot thread Re: [yogi] bug in dir Converter
Paul 9637 Mar 12, 2003, 1:26 PM
Thread; hot thread Re: [Paul] bug in dir Converter
webmaster33 9626 Mar 12, 2003, 1:54 PM
Thread; hot thread Re: [webmaster33] bug in dir Converter
Paul 9607 Mar 12, 2003, 2:10 PM
Thread; hot thread Re: [Paul] bug in dir Converter
webmaster33 9669 Mar 12, 2003, 2:22 PM
Thread; hot thread Re: [webmaster33] bug in dir Converter
Paul 9623 Mar 12, 2003, 2:27 PM
Post; hot thread Re: [Paul] bug in dir Converter
webmaster33 9560 Mar 12, 2003, 2:37 PM
Thread; hot thread Re: [yogi] bug in dir Converter
webmaster33 9607 Mar 12, 2003, 2:47 PM
Thread; hot thread Re: [webmaster33] bug in dir Converter
yogi 9624 Mar 12, 2003, 2:51 PM
Thread; hot thread Re: [yogi] bug in dir Converter
webmaster33 9625 Mar 12, 2003, 2:57 PM
Thread; hot thread Re: [webmaster33] bug in dir Converter
Paul 9630 Mar 12, 2003, 3:19 PM
Thread; hot thread Re: [Paul] bug in dir Converter
webmaster33 9613 Mar 12, 2003, 4:43 PM
Thread; hot thread Re: [webmaster33] bug in dir Converter
ridesworld 9685 Mar 13, 2003, 2:33 AM
Thread; hot thread Re: [ridesworld] bug in dir Converter
Paul 9592 Mar 13, 2003, 3:21 AM
Post; hot thread Re: [Paul] bug in dir Converter
webmaster33 9541 Mar 13, 2003, 3:35 AM
Post; hot thread Re: [ridesworld] bug in dir Converter
webmaster33 9515 Mar 13, 2003, 3:36 AM
Thread; hot thread Re: [webmaster33] bug in dir Converter
Paul 7247 Mar 13, 2003, 5:31 AM
Thread; hot thread Re: [Paul] bug in dir Converter
webmaster33 7257 Mar 13, 2003, 7:02 AM
Post; hot thread Re: [webmaster33] bug in dir Converter
Paul 7225 Mar 13, 2003, 7:07 AM
Thread; hot thread Re: [ridesworld] bug in dir Converter
webmaster33 7223 Mar 29, 2003, 10:00 AM
Thread; hot thread Re: [webmaster33] bug in dir Converter
cwi 7147 Mar 29, 2003, 10:07 AM
Thread; hot thread Re: [cwi] bug in dir Converter
webmaster33 7169 Mar 29, 2003, 10:15 AM
Thread; hot thread Re: [webmaster33] bug in dir Converter
Paul 7179 Mar 29, 2003, 11:20 AM
Thread; hot thread Re: [Paul] bug in dir Converter
webmaster33 7165 Mar 29, 2003, 12:13 PM
Thread; hot thread Re: [webmaster33] bug in dir Converter
Paul 7193 Mar 29, 2003, 12:37 PM
Thread; hot thread Re: [Paul] bug in dir Converter
webmaster33 7193 Mar 29, 2003, 1:09 PM
Thread; hot thread Re: [webmaster33] bug in dir Converter
Paul 7177 Mar 29, 2003, 1:15 PM
Thread; hot thread Re: [Paul] bug in dir Converter
webmaster33 7151 Mar 29, 2003, 1:20 PM
Post; hot thread Re: [webmaster33] bug in dir Converter
Paul 7107 Mar 29, 2003, 1:21 PM