[Dancer-users] One-off subroutines in Dancer

J. Bobby Lopez jbl at jbldata.com
Thu Apr 7 20:24:10 CEST 2011


I've experienced some oddities using Dancer, and it's likely due to my being
a n00b.

Just a quick query on whether I should be able to do something like the
following without any problems:

======================
use Dancer;

get '/' => sub {
  my $hello = test_sub("Hello World!");
  return $hello;
};

start;

sub test_sub
{
  my $data = shift;
  return $data;
}
======================

If not, what would be the correct way to do the above?

Thanks,
-Bobby
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20110407/2773e007/attachment.htm>


More information about the Dancer-users mailing list