[Dancer-users] One-off subroutines in Dancer

J. Bobby Lopez jbl at jbldata.com
Thu Apr 7 20:58:51 CEST 2011


I just wanted to confirm that the code below should work, and voila, it does
:)

Just some buggy code on my part;  after I ran into a problem with code
(similar to the example), I had to question if it was something I didn't
understand about the framework.  It wasn't the framework, it was me :\

On Thu, Apr 7, 2011 at 2:36 PM, ambs <ambs+dancer at perl-hackers.net> wrote:

> Hello, Bobby.
>
> What are the oddities you are experiencing? Is there any behavior or error
> you can describe, so it gets easier to help you?
>
> Cheers,
> ambs
>
>
> On 07/04/2011 19:24, J. Bobby Lopez wrote:
>
>> 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
>>
>>
>>
>> _______________________________________________
>> Dancer-users mailing list
>> Dancer-users at perldancer.org
>> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>>
>
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20110407/89aa0018/attachment.htm>


More information about the Dancer-users mailing list