Good morning,

On 15/2/15 at 9:51 PM +0100, Erik Colson <e...@ecocode.net> wrote:

>However, the code doesn't work if I put a 'use String::Util;' at the top
>of the package and replace 'String::Util::trim' by 'trim'. It looks like
>the declaration gets out of scope.

You need to either import the `trim` sub:

use String::Util 'trim';
......
return 'CALC: '.trim( $self->acolumn );


Or you need to call the sub with the package name as you were doing before:

return 'CALC: '.String::Util::trim( $self->acolumn );


Charlie

-- 
   Charlie Garrison  <garri...@zeta.org.au>
   github.com/cngarrison   metacpan.org/author/CNG

O< ascii ribbon campaign - stop html mail
http://www.ietf.org/rfc/rfc1855.txt


_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to