Geolocation services: what's good, what's not?

2014-12-02 Thread Sam Kington
Hi, The new EU VAT rules require us to work out where a customer is so we can charge the right VAT rate. https://www.gov.uk/government/publications/vat-supplying-digital-services-and-the-vat-mini-one-stop-shop/vat-supplying-digital-services-and-the-vat-mini-one-stop-shop The customer's billing

Re: Dear Dr Who experts...

2014-10-09 Thread Sam Kington
Doesn't the plot of one of the 1960s films hinge on the Daleks not being able to levitate though? Bit inconsistent. Are the films not considered canonical? No. (The wikipedia article itself says The film was not intended to form part of the ongoing storylines of the television series. and

Re: Character encodings and databases

2014-06-20 Thread Sam Kington
Cutting and pasting to try and get some clarity. As a reminder, this is what Mac OS says about the problematic character in question: ü LATIN SMALL LETTER U WITH DIAERESIS Unicode: U+00FC, UTF-8: C3 BC On 20 Jun 2014, at 09:37, Andrew Hill london...@welikegoats.com wrote: my $zurich = Zürich;

Re: Getting the schema for a DB table

2014-05-27 Thread Sam Kington
On 26 May 2014, at 17:45, Simon Wistow si...@thegestalt.org wrote: On Sun, May 25, 2014 at 07:38:54PM +0200, Thomas Klausner said: If you want a hash of the current DB schema, take a look at DBIx::SchemaChecksum Not sure if this is what you're after, but I hope it helps.. It would be

Re: Regex to match odd numbers

2014-05-27 Thread Sam Kington
As part of the nasty mess that is CPANdeps, I have this line of code: $record-{is_dev_perl} = ( $record-{perl} =~ /(^5\.(7|9|11|13|15|17|19|21)|rc|patch)/i ) ? 1 : 0; I'd like to not have to remember to add 23 to the list in a year or so's time. Can anyone think of a nice way of

Re: ORMs du jour?

2013-10-21 Thread Sam Kington
On 21 Oct 2013, at 17:19, Peter Corlett ab...@cabal.org.uk wrote: On 21 Oct 2013, at 15:33, Abigail abig...@abigail.be wrote: [...] My recommendation for ORMs: don't. http://blogs.tedneward.com/2006/06/26/The+Vietnam+Of+Computer+Science.aspx I've only skimmed that article, but it seems to

Working from home (was: Re: Alternative sources of Perl programmers)

2013-05-13 Thread Sam Kington
On 13 May 2013, at 23:27, Kieren Diment dim...@gmail.com wrote: The management challenges for telecommute jobs are different to those for on site. But it does increase the pool of potential candidates a lot. Does anyone have any useful experience about managing mixed on-site/offsite

URL shorteners (was: Re: ISNIC DNS)

2013-05-08 Thread Sam Kington
On 8 May 2013, at 11:07, Kieren Diment dim...@gmail.com wrote: On 08/05/2013, at 7:37 PM, Dave Cross wrote: Quoting AJ Dhaliwal adhaliwa...@gmail.com: Dave... [Who is seriously considering replacing fkth.is with fkth.at] Too late. I have purchased fkth.at and will sell it to you for 1

Re: URL shorteners (was: Re: ISNIC DNS)

2013-05-08 Thread Sam Kington
On 8 May 2013, at 14:21, Jérôme Étévé jerome.et...@gmail.com wrote: On 8 May 2013 13:48, Ben Evans benjamin.john.ev...@gmail.com wrote: On Wed, May 8, 2013 at 1:01 PM, Sam Kington s...@illuminated.co.uk wrote: Getting off-topic here, but what use are URL shorteners now that Twitter converts

Re: API wrapper best practices?

2013-03-24 Thread Sam Kington
On 24 Mar 2013, at 13:13, Ashley Hindmarsh ash+p...@best-scarper.co.uk wrote: I guess the holy grail is something that takes the API schema and builds the classes on-the-fly, and is closer to what Dave Hodg is after. People thought of that, and now we have SOAP. So be careful for what you wish

Re: Ungooglable interview questions (was: Re: New perl features?)

2013-03-17 Thread Sam Kington
On 17 Mar 2013, at 09:24, Abigail abig...@abigail.be wrote: On Sun, Mar 17, 2013 at 01:54:37AM +, Sam Kington wrote: At $WORK we ask new hires, over IRC (because everyone potentially works remotely), a variant of chromatic's http://modernperlbooks.com/mt/2011/01/how-to-identify-a-good

Re: Assign method call to hash value?

2013-01-28 Thread Sam Kington
On 29 Jan 2013, at 01:45, gvim gvi...@gmail.com wrote: I have a form validation sub thus: sub val { my $params = shift; my $r = Data::FormValidator-check($params, \%register); my $passed = $r-success !$r-has_unknown; my $valid = $r-valid; my $missing = $r-missing; my $invalid =

Re: Updating lots of database fields in a single row

2013-01-23 Thread Sam Kington
On 23 Jan 2013, at 11:09, Abigail abig...@abigail.be wrote: I'd say that dogmas are poor practise. Good practise is actually *knowing* when you should use placeholders, and when there's no need. Because someone who knows can actually be trusted to do variable interpolation in places

Re: 25 Years of Perl

2012-11-22 Thread Sam Kington
On 20 Nov 2012, at 16:09, Dave Cross d...@dave.org.uk wrote: [regarding matt's scripts] If anyone is unaware of the London Perl Mongers' reaction to Matt's scripts, you should probably read http://www.scriptarchive.com/nms.html Some mention should be made also of the attempt to rewrite the

Re: 5 minimums for any perl script?

2012-01-30 Thread Sam Kington
On 30 Jan 2012, at 13:50, Guinevere Nell wrote: I would suggest that Perl::Critic, version control, and modularization combined with use of perldoc (instead of just comments with hoped for documentation to be made later/never) and make when a project is ready for production allow a high

Re: 5 minimums for any perl script?

2012-01-30 Thread Sam Kington
On 30 Jan 2012, at 15:26, Paul Johnson wrote: On Mon, Jan 30, 2012 at 03:00:00PM +, Sam Kington wrote: One problem with perlcritic is that many of its rules, out of the box, are silly and annoying. You need to do a fair amount of tweaking to stop it bitching about stuff you don't care

Re: 5 minimums for any perl script?

2012-01-30 Thread Sam Kington
On 30 Jan 2012, at 15:44, Mike Whitaker wrote: On 30 Jan 2012, at 15:40, Sam Kington wrote: In the code that we write at $WORK, any filehandle we close tends to be a log file or something, so adding extra boilerplate to our close statements would just be annoying. use 5.10; use autodie