Leveraging synergy in this championship year
Michael Davies
Local
News
Software
Utility
Powered by PyBlosxom
Copyright © 2003, 2004, 2005, 2006, 2007, 2008 Michael Davies, |
Perl's CGI is broken
use strict;
use warnings;
use CGI;
use Test::More qw( no_plan );
my $cgi = new CGI;
$cgi->param('foobar', 6);
ok( $cgi->param("foobar") eq '6', "6 is a magical number" );
$cgi->param('foobar', 4);
ok( $cgi->param("foobar") eq '4', "And 4 is a favourite" );
my %hash = ( "random_key" => '13' );
$cgi->param('foobar', $hash{'randomKey'} );
ok( $cgi->param("foobar") eq '13',
"but a simple typo in a hash key shouldn't be so hard to find" ); # Fail
ok( $cgi->param("foobar") eq '4',
"so it hasn't changed but there's no complaint" );
$cgi->param('foobar', $hash{'random_key'} );
ok( $cgi->param("foobar") eq '13', "The key is to get the key right :-)" );
What sort of deranged API silently ignores calling a setter with an undef? Surely a warning or exception could have been thrown? Or perhaps setting the value to undef, or to the empty string, or even "You messed up, Idiot!". But quietly swallowing the error and leaving the value unchanged is really bad form. This sort of thing doesn't rate well on Rusty's API design advice: How Do I Make This Hard to Misuse?. Grrr.
Zookeepr - Hearding the ElephantsAwesome! - Zookeepr is seeing some open-development lovin'.
LinuxSA June 2008 - Open Street Map (OSM)
Hi all,
Time for the June meeting announcement (it's next Tuesday)...
The usual details:
When: 7:00pm-9:30pm on Tuesday, 17th June, 2008
Where: EXCOM Education
Ground Floor
191 Pulteney Street
Adelaide SA
Cost: FREE
Who: Anyone and everyone.
No pre-registration necessary.
Presentation:
Adrian Billiau will be giving a talk on Open Street Map (OSM), a
free editable map of the whole world, made by people like you.
The presentation will include:
- about the OSM project
- tools used by the project
- advice on contributing, collecting data, uploading data, and using
JavaOSM
- a demonstration
Adrian is a 3rd year Surveying student at the University of South
Australia.
Pizza:
We'll order in pizza to have at EXCOM after the presentation. Bring
$8 if you are hungry.
For more information:
Email: organisers@linuxsa.org.au
Web Page: http://www.linuxsa.org.au/
Mailing List: linuxsa@linuxsa.org.au
IRC: #linuxsa on irc.freenode.net
|
|||||||||||||||||||||||||||||||||||||||||||||||||
|
This web page is optimised
for standards. |
||||||||||||||||||||||||||||||||||||||||||||||||||