CRM as a service with Perl module

2014-11-04 Thread Andrew Beverley
Hi guys, Can anyone recommend a hosted CRM solution (except for Salesforce) that has a CPAN module in order to easily access the API? Thanks, Andy

Re: Getting the "latest" related record from a SQL DB

2014-10-12 Thread Andrew Beverley
On Sun, 2014-10-12 at 17:25 +0100, Andrew Beverley wrote: > On Sun, 2014-10-12 at 17:00 +0100, Andrew Beverley wrote: > > And then add the relevant search criteria when using it: > > > > $search = { > > {'album' => 'album_later'}, &

Re: Getting the "latest" related record from a SQL DB

2014-10-12 Thread Andrew Beverley
On Sun, 2014-10-12 at 17:00 +0100, Andrew Beverley wrote: > And then add the relevant search criteria when using it: > > $search = { > {'album' => 'album_later'}, > ... > } Oops, copy and paste error. More like: $rs->search({ 'album_later.artist_id' => undef });

Re: Getting the "latest" related record from a SQL DB

2014-10-12 Thread Andrew Beverley
On Thu, 2014-10-09 at 13:28 +0100, Andrew Beverley wrote: > I have a table (say "artist", couldn't resist...) that has a one-to-many > relationship to another table (say "album"). The album table has a field > which references the artist table's I

Getting the "latest" related record from a SQL DB

2014-10-09 Thread Andrew Beverley
Hi guys, I'm after some best-practice advice regarding SQL database design. I have a table (say "artist", couldn't resist...) that has a one-to-many relationship to another table (say "album"). The album table has a field which references the artist table's ID. So one artist can have many albums.

Re: Ansible (was: Deploying perl code)

2014-08-11 Thread Andrew Beverley
On Mon, 2014-08-11 at 10:43 -0500, Eric Johnson wrote: > Have you looked at Rex? They have pretty good docs: http://rexify.org Thanks Eric (and Pierre) - no, I hadn't come across that. I'll have a play with it and see how it is - looks very promising though. > Its a deployment type tool vaguely

Ansible (was: Deploying perl code)

2014-08-11 Thread Andrew Beverley
On Fri, 2014-07-25 at 12:08 +0200, James Laver wrote: > On 25 Jul 2014, at 11:54, Andrew Beverley wrote: > > > The main problem is that it seems to be a victim of its own success: > > there is a huge backlog of merge requests. I'd like to provide some > > simple patc

Re: Deploying perl code

2014-07-25 Thread Andrew Beverley
On Fri, 2014-07-25 at 12:08 +0200, James Laver wrote: > On 25 Jul 2014, at 11:54, Andrew Beverley wrote: > > > The main problem is that it seems to be a victim of its own success: > > there is a huge backlog of merge requests. I'd like to provide some > > simple patc

Re: Deploying perl code

2014-07-25 Thread Andrew Beverley
On Fri, 2014-07-25 at 10:11 +0200, James Laver wrote: > Ansible I do like for the most part I'm a fan of Ansible, and am in the process of using it to deploy code (although more by accident than design). The main problem is that it seems to be a victim of its own success: there is a huge backlog

Re: [ANNOUNCE] Reminder: Tech Meet this Thursday 7pm at Conway Hall

2014-07-23 Thread Andrew Beverley
On Wed, 2014-07-23 at 09:09 +0100, Vytautas D wrote: > All the traffic&parking aside, there are quite a few of us coming from > southampton.pm, hence it's much cheaper option.. . A real shame if this is the case. It makes me so sad to see people driving into central London. Hamburg anyone?

Re: Interview - a Dancer in London:)

2014-06-26 Thread Andrew Beverley
On Thu, 2014-06-26 at 10:36 +0100, mascip wrote: > You spreadsheet-y software sounds interesting. I hope I'll get to hear you > talk about this one. It's pretty basic, but more than happy to talk about it sometime. > With vim-like keybindings perhaps? ;-) I'm afraid my target audience wouldn't e

Re: Interview - a Dancer in London:)

2014-06-26 Thread Andrew Beverley
On Thu, 2014-06-26 at 08:56 +0100, Sue Spence wrote: > > 1. 5 things I wish I'd known as a Perl beginner. > > > > I think this one would make a good first talk at our next tech meet. It > could be very low stress with a minimum of preparation time. 5 slides, a > bit of chat about each one, and o

Re: Interview - a Dancer in London:)

2014-06-26 Thread Andrew Beverley
On Thu, 2014-06-26 at 07:30 +0100, james.la...@gmail.com wrote: > ‎Be careful of yaks. I went to write some blogging software and I've > made 10 modules releasable since, but still no blog. Well yes, it's not /actually/ on CPAN yet. I was thinking I could talk about the Email::Signature module I a

Re: Interview - a Dancer in London:)

2014-06-25 Thread Andrew Beverley
On Wed, 2014-06-25 at 14:21 +, Tom Hukins wrote: > There's only one part that worries me: > > Is there any chance you'll give a presentation at the next LPW? > > Possibly, but I don't feel I've got to that level yet! Ah, peer pressure ;-) Hmmm. Anybody interested in either of these? 1.

Re: Evaluating user-defined conditions

2014-06-11 Thread Andrew Beverley
On Tue, 2014-06-10 at 13:43 +0200, Abigail wrote: > > I'm going to need to allow strings to be matched. E.g: > > > > [age] > 10 && [name] eq "jon" > > Allow any string? Including strings that may potentially excute code? > In that case, eval will be wrong. Or is the string just a list of > alpha

Re: Evaluating user-defined conditions

2014-06-10 Thread Andrew Beverley
On Tue, 2014-06-10 at 12:23 +0200, Abigail wrote: > Note that all you need is a *validating* parser. You don't have to bother > with building a parse tree, and evaluating the results -- *that* can be > left to Perl. Ah, okay, thanks. > Here's a pattern that accepts expressions of the form you ini

Re: Evaluating user-defined conditions

2014-06-10 Thread Andrew Beverley
On Tue, 2014-06-10 at 11:37 +0200, Abigail wrote: > On Tue, Jun 10, 2014 at 09:26:17AM +0100, Andrew Beverley wrote: > > On Tue, 2014-06-10 at 09:20 +0200, Abigail wrote: > > > > # Sanitise > > > > $_ = $code; > > > > return unless /^[ \S]

Re: Evaluating user-defined conditions

2014-06-10 Thread Andrew Beverley
On Tue, 2014-06-10 at 10:05 +0100, James Laver wrote: > I was sort of hoping that the not too subtle hints that using eval is a > bad idea would pay off. Apparently not. D'oh, I thought someone might say that... But it's so easy ;-) Got the message, will play with a parser.

Re: Evaluating user-defined conditions

2014-06-10 Thread Andrew Beverley
On Tue, 2014-06-10 at 09:20 +0200, Abigail wrote: > > # Sanitise > > $_ = $code; > > return unless /^[ \S]+$/; # Only allow normal spaces > > return if /[\[\]]+/;# No brackets should remain > > return if /\\/; # No escape

Re: Evaluating user-defined conditions

2014-06-10 Thread Andrew Beverley
On Tue, 2014-06-10 at 09:20 +0200, Abigail wrote: > > # Sanitise > > $_ = $code; > > return unless /^[ \S]+$/; # Only allow normal spaces > > return if /[\[\]]+/;# No brackets should remain > > return if /\\/; # No escape

Re: Evaluating user-defined conditions

2014-06-09 Thread Andrew Beverley
On Mon, 2014-06-09 at 11:36 +0100, Andrew Beverley wrote: > Dear all, > > I'd like to take a condition specified by a user and use it to perform a > set of tests on a data set. Is there a module to do this? Thanks for all the replies. Indeed, I can't trust the user in

Evaluating user-defined conditions

2014-06-09 Thread Andrew Beverley
Dear all, I'd like to take a condition specified by a user and use it to perform a set of tests on a data set. Is there a module to do this? For example, I might have an array of hashes containing "name", "price" and "age". I would like a user to be able to define their own condition, such as "ag

Libreoffice/Microsoft office compatibility and pagination

2014-06-02 Thread Andrew Beverley
Hi guys, Does anyone have any advice to help ensure that Microsoft Office files open (and save) correctly in Libreoffice (on Linux), in particular in terms of pagination? >From what I have read the advice seems to be: 1. Install Microsoft fonts 2. Use a recent version of Libreoffice However, th

Re: Module namespace for projects

2014-05-25 Thread Andrew Beverley
On Fri, 2014-05-23 at 09:42 +, Tom Hukins wrote: > On Thu, May 22, 2014 at 09:59:00AM +0100, Andrew Beverley wrote: > > Following on from the above, should I then be uploading the modules to > > CPAN? > > In addition to James's helpful reply, one of my colleagues re

Re: Module namespace for projects

2014-05-22 Thread Andrew Beverley
On Thu, 2014-05-22 at 11:20 +0100, James Laver wrote: > First thing I’d say is give your project a short-ish name so that if > you do release it to the cpan, you won’t die of RSI. > > Second thing is to pick a root Module name that doesn’t clash with > something in cpan. Other than that, don’t wo

Module namespace for projects

2014-05-22 Thread Andrew Beverley
Hi guys, I'm creating a Perl project that I hope to eventually release (a Postfix filter to add signatures to outgoing emails). My aim is to eventually release it as a Debian package. A stupid question, but I'm a bit unsure about how I should define the namespace for my project's modules. Do I ne

Show your "love" for OpenSSL

2014-04-19 Thread Andrew Beverley
Show your "love" for OpenSSL with this tee shirt: http://teespring.com/iheartbleedopenssl "I Heartbleed OpenSSL" Some money from each tee goes to the OpenSSL foundation.

Re: Releasing a module with additional dependencies

2014-04-15 Thread Andrew Beverley
> Yes. Make it a mandatory dependency. Great, thanks for the quick replies guys - I'll do that. > Or if the new dependency is enormous, difficult to install, In my case I'm guessing that most people will have TimeZone installed anyway (or it will be easy to install), so I'll just add it as manda

Releasing a module with additional dependencies

2014-04-15 Thread Andrew Beverley
Hi guys, A bit of a newbie question on publishing a module. I've just taken over as maintainer of Device::VantagePro and released a new version with some additional features. One of the features (get_timezone) requires DateTime::TimeZone, which was not previously needed. I need some advice as to

Re: XP-Replacement for Parents

2014-03-27 Thread Andrew Beverley
On Thu, 2014-03-27 at 11:48 +, Smylers wrote: > Options that I can see: > > • Ubuntu: I moved my parents onto Ubuntu (now Mint) after getting fed up with many "support" calls with things not working in Windows. They took to Ubuntu with no problems at all, and I now got far fewer requests to h

Re: [ANNOUNCE] Damian Conway Speaking at London.pm: Monday, 10th March

2014-03-07 Thread Andrew Beverley
On Fri, 2014-03-07 at 11:34 +, Damian Conway wrote: > Or maybe people just don't believe they need to learn anything more > about regexes. ;-) I have to confess that I didn't read the original invitation properly, and thought that it was aimed at people who have no regex experience. Of course,

Re: London.pm approved drinking venues?

2014-03-04 Thread Andrew Beverley
On Tue, 2014-03-04 at 11:24 -0500, Kevin Falcone wrote: > For those who are willing to offer personalized recommendations, I > appreciate it :) I'm also going to go through the web archived links. > > We're holding training in W2 3NR Only been there once, but I recall the Sawyers Arms is quite g

Re: [ANNOUNCE] London Perl Mongers March Social - 2014-03-06 - The Antelope SW1W 8EZ

2014-02-19 Thread Andrew Beverley
On Wed, 2014-02-19 at 17:22 +, Andrew Beverley wrote: > Dear all, > > The March London.pm Social will be on Thursday 6th March, at The > Antelope, just off Sloane Square. The pub was previously used by another > group that I'm a member of; at that event the beer score

[ANNOUNCE] London Perl Mongers March Social - 2014-03-06 - The Antelope SW1W 8EZ

2014-02-19 Thread Andrew Beverley
Dear all, The March London.pm Social will be on Thursday 6th March, at The Antelope, just off Sloane Square. The pub was previously used by another group that I'm a member of; at that event the beer scored 8.5/10 (a strong score for that particular group!) http://www.openstreetmap.org/node/954730

Re: FOSDEM trip / accomodation / etc...

2014-01-21 Thread Andrew Beverley
On Mon, 2014-01-20 at 23:30 +, Paul "LeoNerd" Evans wrote: > So it seems at somewhat last-minute I'm going to FOSDEM to do a Perl > talk. > > Anyone been before? I'm looking for recommendations on travel and > where to stay. Previously I've actually just gone for one day, out and back on the

Re: Using grep on undefined array

2013-08-15 Thread Andrew Beverley
On Wed, 2013-08-14 at 00:09 +0100, Andrew Beverley wrote: > Hi, > > Could someone please explain to me why the following outputs an empty > string rather than "*"? [...] Thanks for all the replies - a very interesting read. I had never even heard of autovivification, so ve

Using grep on undefined array

2013-08-13 Thread Andrew Beverley
Hi, Could someone please explain to me why the following outputs an empty string rather than "*"? get(); sub get($) { my $fields = shift; my @fields = grep $_ ne 'domain', @$fields; my $select_fields = $fields ? join(',', map { 'users.' . $_ } @fields) : '*'; print "$select_fields\

Re: Installing WWW::Webkit on Debian/Mint

2013-07-22 Thread Andrew Beverley
On Mon, 2013-07-22 at 17:35 +, dave.lamb...@gmail.com wrote: > I have had good results in the past on resistive websites with > WWW::Selenium. Thanks. That will be my fallback if the website is more complicated than I originally thought (it's several years old, so hoping it doesn't have much/a

Re: Installing WWW::Webkit on Debian/Mint

2013-07-22 Thread Andrew Beverley
> Otherwise WWW::Mechanize. Wow, thanks for that, that was easy. Works well on a test website, just need to try on said clunky HR system tomorrow :)

Installing WWW::Webkit on Debian/Mint

2013-07-22 Thread Andrew Beverley
Hi, Quick question: has anybody had any success installing WWW::Webkit on Debian (v7.1) or Linux Mint (v12)? I won't list all the problems that I am having just now (suffice to say they are various recursive dependency failures that I don't want to spend lots of time on). I'm more interested to k

Re: Scope of variables in a function

2013-06-01 Thread Andrew Beverley
On Sat, 2013-06-01 at 21:08 +0100, Dominic Thoreau wrote: > On 1 June 2013 20:59, Andrew Beverley wrote: > > > On Sat, 2013-06-01 at 20:33 +0100, Anthony Lucas wrote: > > > Relying on its _contents_ is what you shouldn't be doing. There' a > > > differen

Re: Scope of variables in a function

2013-06-01 Thread Andrew Beverley
On Sat, 2013-06-01 at 20:33 +0100, Anthony Lucas wrote: > Relying on its _contents_ is what you shouldn't be doing. There' a > difference. Okay, in which case I reckon there should be a warning when trying to use the contents, when the declaration hasn't happened because of the condition ;-)

Re: Scope of variables in a function

2013-06-01 Thread Andrew Beverley
On Sat, 2013-06-01 at 19:15 +0100, Anthony Lucas wrote: > > Thanks for that. Obviously I should have RTM, but it does seem strange > > that something that is not recommended does not produce any sort of > > warnings. > > It's not that it's not recommended, it's just that it's usually not what > you

Re: Scope of variables in a function

2013-06-01 Thread Andrew Beverley
On Sat, 2013-06-01 at 19:13 +0200, Paul Johnson wrote: > And the official line from perlsyn: > > NOTE: The behaviour of a "my", "state", or "our" modified with a statement > modifier conditional or loop construct (for example, "my $x if ...") is > undefined. The value of the "my" varia

Re: Scope of variables in a function

2013-06-01 Thread Andrew Beverley
On Sat, 2013-06-01 at 18:23 +0100, Dirk Koopman wrote: > On 01/06/13 18:03, Hakim Cassimally wrote: > > Andy, > > > > I believe your problem is: > > > > my $x = 'FOO' if $condition; > > > > This only declares the new variable if $condition, so it ends up having > > surprising, static-like beha

Scope of variables in a function

2013-06-01 Thread Andrew Beverley
Could somebody explain why the following code prints "barbar" rather than "bar" please? I am trying to understand why the $result variable in the search function retains its value the second time the function is called. Up until now I had thought that variables in a function defined with "my" woul

Re: Perl School on Saturday

2013-04-03 Thread Andrew Beverley
On Wed, 2013-04-03 at 12:27 +0100, David Cantrell wrote: > On Wed, Apr 03, 2013 at 09:29:17AM +0100, Dave Cross wrote: > > Quoting Andrew Beverley : > > >On Tue, 2013-04-02 at 10:03 +0100, Dave Cross wrote: > > >>There are still plenty of tickets available for my

Re: Perl School on Saturday

2013-04-03 Thread Andrew Beverley
On Tue, 2013-04-02 at 10:03 +0100, Dave Cross wrote: > Hi all, > > There are still plenty of tickets available for my Perl School on > Moose at Google Campus this coming Saturday (6th April). I realise that this course is a repeat in itself, but are there any plans to repeat it again? I'd like

Re: Updating lots of database fields in a single row

2013-01-23 Thread Andrew Beverley
On Tue, 2013-01-22 at 22:57 +, Andrew Beverley wrote: > I've not been developing with Perl for long, so I'd like to know if > there is a better way of writing the following database query (or is > there a better place to ask?): Thanks for the many excellent replies. I&#x

Updating lots of database fields in a single row

2013-01-22 Thread Andrew Beverley
I've not been developing with Perl for long, so I'd like to know if there is a better way of writing the following database query (or is there a better place to ask?): my @fields = qw(field1 field2 field3 field4 field5 field6 field7 ... ); my @updates; foreach my $field (@fields) { push @upda

Re: cpan you have to see

2012-12-13 Thread Andrew Beverley
On Wed, 2012-12-12 at 17:45 +, Gareth Harper wrote: > Without commenting on the function of the modules (I personally > wouldn't use them, but I can see what you're trying to accomplish). > Style/function/speed wise there certainly are a few areas which you > may want to address. I'll explain