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