jon peterson writes: I have created a very modest online Perl test at my site. It is very much in beta, but then so is this site, so it seemed appropriate.
This is not (yet...) a test in certification terms, more a fun quiz, but if you have an interest in Perl Tests you might like to have a look, add a couple of questions, and send me any feedback, bug reports, moans and groans you have.
If you aware of any similar online Perl tests, do let me know.
Doesn't work. :)
Fletch on 2000-05-17T14:17:27
Ironically, I get an `Odd number of items in hash at line something-or-other' error when I try to take the test.
Re:Doesn't work. :)
pudge on 2000-05-17T17:26:36
That's because you broke it.
Re:Doesn't work. :)
That's because you aren't cookie friendly.
If you tell me your browser/os combo + any cookie affecting software you may have, that will help me.
It does seem that a large number of people are very anti cookie, which we won't go into here. This is a shame, but it may be that my use of cookies is in some way bad.
Meanwhile, feel free to use a cookie-friendly browser to use the site
:-)
And yes, I will catch that error and make it say something more useful than waffle about hashes
:-)
Re:Doesn't work. :)
Fletch on 2000-05-19T15:04:46
I didn't think my ad blocking proxy was diddling with cookies, but when I set `direct connection' (NS 4.72, accept cookies from same site only) it worked fine (and I got an 80% on difficulty 4 :/). At any rate, I'm going through squid with `ad-zap'.
http://www.zip.com.au/user/cs/adzap/index.html
Re:Doesn't work. :)
pudge on 2000-05-20T17:52:16
I have cookies working (that is how I can post on Slash!), I am not using any proxy, and I get the "cookies must be on" error. Inspecting the stream, I can see cookies are being set; why do you think they aren't?
Re:Doesn't work. :)
Oh happy web development.
Things worked fine in IE and in Netscape 6.0 beta (on Windows.) The KDE browser and Netscape 4.x on Linux thought otherwise.
I maintain I was RFC compliant and they weren't, but I've changed to a subset of the RFC which we all seem to comply with currently, so I think everything is happy, and yes I should have used a cookie library, but I naively figured writing one line of text would be easy
:_)
What's a beta test for..
Re:Doesn't work. :)
pudge on 2000-05-21T17:37:11
It is still not working for me. Netscape 4.72 and IE 5 and iCab PR 2, all for Mac OS. The only browser I have that works is Netscape 6 PR 1.
And there is a question I got right that is wrong, #17:
"Which of the following is functionally the same as: my $person = new Employee::Temp;"?
My answer was "my $person = Employee::Temp->new()". However, the "correct" answer was given as "my $person = &Employee::Temp::new()". But the "new Class" and "Class->new" are really correct, because both call new() as a class method. They send the class name as the first argument, and they honor inheritance. Consider:
#!/usr/bin/perl -wl
package Employee::Temp;
@ISA = 'Employee';
sub rate { 'hourly' }
package Employee;
sub new { bless {}, shift }
sub rate { 'salary' }
package main;
my $p1 = new Employee::Temp;
print $p1->rate;
my $p2 = Employee::Temp->new();
print $p2->rate;
my $p3 = &Employee::Temp::new(); # no such subroutine
print $p3->rate; # huh?
Hmmm...error
clinton on 2000-05-25T14:58:45
You're not cooking your CGI values as you receive them. This can be bad. For example, using a URL of:
http://www.snowdrift.org/cgi-bin/eperl/computers/perl/pt/question.ep?id=*
Causes an SQL error to print:
DBD::mysql::st execute failed: You have an error in your SQL syntax near '* and b.question_id = a.question_id and c.category_id = a.category' at line 1 at /home/snowdrif/lib/perl/PerlTest/Question.pm line 80.
DBD::mysql::st execute failed: You have an error in your SQL syntax near '* and b.question_id = a.question_id and c.category_id = a.category' at line 1 at /home/snowdrif/lib/perl/PerlTest/Question.pm line 80.
1
Did you really want me to be able to put in values on my end and have them inserted directly into your SQL? :)
PS: Your e-mail address isn't on the test site anywhere.