[Dancer-users] 'set' and 'any' redefined by PDL

Naveed Massjouni naveedm9 at gmail.com
Mon Sep 6 00:42:55 CEST 2010


On Sun, Sep 5, 2010 at 12:21 PM, P Kishor <punk.kish at gmail.com> wrote:
> Hello,
>
> I have a problem... I am incorporating PDL (http://pdl.perl.org) into
> my Dancer web site, and I am getting the error message that 'set' and
> 'any' are redefined. 'set' and 'any' are important PDL methods. Is
> there any way I can redefine Dancer's 'set' and 'any' to something
> like 'dancer-set' and 'dancer-any' and have everyone live in harmony?
>

There may be a better way, but you can explicitly tell Dancer exactly
what functions you want imported if you provide a list when you use
Dancer: use Dancer qw(just the functions i want).

#!/usr/bin/env perl
use Dancer qw(dance);
Dancer::any '/' => sub { 'hello' };
dance;

-Naveed

>
>
> --
> Puneet Kishor http://www.punkish.org
> Carbon Model http://carbonmodel.org
> Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
> Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
> Nelson Institute, UW-Madison http://www.nelson.wisc.edu
> -----------------------------------------------------------------------
> Assertions are politics; backing up assertions with evidence is science
> =======================================================================
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>


More information about the Dancer-users mailing list