From sarah at averna.id.au Wed Oct 1 14:37:51 2014
From: sarah at averna.id.au (Sarah Fuller)
Date: Wed, 1 Oct 2014 23:37:51 +1000
Subject: [dancer-users] Dancer Plugins Maintainers team on Github
In-Reply-To:
References:
<20140914231257.GA11440@gilgamesh.babyl.dyndns.org>
Message-ID:
If people think I can be of any use, I'd be interested in helping out.
Love Dancer and can code a bit. On github: averna-syd
On Sat, Sep 27, 2014 at 7:34 AM, Henk van Oers wrote:
>
> On Sun, 14 Sep 2014, Yanick Champoux wrote:
> [...]
>
>> .. btw, is it me, or is that group could also be
>> named "the X-Men"? :-)
>>
>
> Aha, that's why I can't adopt James Aitken's module.
> I have no X...
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From hvo.pm at xs4all.nl Wed Oct 1 17:31:13 2014
From: hvo.pm at xs4all.nl (Henk van Oers)
Date: Wed, 1 Oct 2014 18:31:13 +0200 (CEST)
Subject: [dancer-users] comparison table D1/D2
In-Reply-To:
References: <5412DBC2.6040609@vincew.net>
<5412F317.70608@vincew.net>
<541309E8.9090807@vincew.net>
Message-ID:
On Fri, 12 Sep 2014, Henk van Oers wrote:
[FreeBSD D2 ports]
>> What to do with them?
>
> - First: upgrade to 0.150000
> - Next: Make a "FreeBSD port" for
> https://metacpan.org/pod/Dancer2::Plugin::DBIC
Done, with the help of Wen Heping, thx.
Next: Dancer2-Plugin-Passphrase
(A bit more work)
--
Henk
From Jakob.Voss at gbv.de Wed Oct 1 08:15:45 2014
From: Jakob.Voss at gbv.de (=?UTF-8?B?SmFrb2IgVm/Dnw==?=)
Date: Wed, 1 Oct 2014 09:15:45 +0200
Subject: [dancer-users] Official Docker image for Dancer?
Message-ID: <542BAA21.4010209@gbv.de>
Hi,
Peter Martini has created a Docker image for Dancer, which I have
contributed to:
https://github.com/PeterMartini/docker-dancer
https://registry.hub.docker.com/u/petermartini/docker-dancer/
If this is ok to Peter, I'd prefer this to be an official repository at
https://github.com/PerlDancer. You should also create an Docker
organization account for the Dancer community:
https://hub.docker.com/account/organizations/
The current documentation could be extended to a tutorial.
Rob N already did good work here: http://robn.io/docker-perl/
(I'm not sure we should recommend the git glone approach as *only* way
to build your dancer application image, one could also use "COPY" in a
Dockerfile and "docker build"). A similar tutorial for another language
is https://docs.docker.com/examples/nodejs_web_app/.
Anyway: I think that an (or multiple) official Docker images for Dancer
could improve the visibility and usability of Dancer framework a lot.
Cheers,
Jakob
P.S: If Task::Dancer wasn't stalled (no updates since 2012?!) I'd
recommend to install Task::Dancer instead of just Dancer
--
Jakob Vo?
Verbundzentrale des GBV (VZG) / Common Library Network
Platz der Goettinger Sieben 1, 37073 G?ttingen, Germany
+49 (0)551 39-10242, http://www.gbv.de/
From petercmartini at gmail.com Wed Oct 1 12:50:14 2014
From: petercmartini at gmail.com (Peter Martini)
Date: Wed, 1 Oct 2014 07:50:14 -0400
Subject: [dancer-users] Official Docker image for Dancer?
In-Reply-To: <542BAA21.4010209@gbv.de>
References: <542BAA21.4010209@gbv.de>
Message-ID:
I was hoping to make it official, just wasn't sure who I should get to jump in and sign off. It'd be neat to get this done in time for the conference :-)
I also wasn't sure of the best way to handle versioning, and in particular Dancer v. Dancer2, so any insight or advice is appreciated.
By the way, thanks for pointing me to those blog posts, and thanks to Rob for writing it!
Sent from my iPhone
> On Oct 1, 2014, at 3:15, Jakob Vo? wrote:
>
> Hi,
>
> Peter Martini has created a Docker image for Dancer, which I have contributed to:
>
> https://github.com/PeterMartini/docker-dancer
> https://registry.hub.docker.com/u/petermartini/docker-dancer/
>
> If this is ok to Peter, I'd prefer this to be an official repository at https://github.com/PerlDancer. You should also create an Docker organization account for the Dancer community:
> https://hub.docker.com/account/organizations/
>
> The current documentation could be extended to a tutorial.
> Rob N already did good work here: http://robn.io/docker-perl/
> (I'm not sure we should recommend the git glone approach as *only* way to build your dancer application image, one could also use "COPY" in a Dockerfile and "docker build"). A similar tutorial for another language is https://docs.docker.com/examples/nodejs_web_app/.
>
> Anyway: I think that an (or multiple) official Docker images for Dancer could improve the visibility and usability of Dancer framework a lot.
>
> Cheers,
> Jakob
>
> P.S: If Task::Dancer wasn't stalled (no updates since 2012?!) I'd recommend to install Task::Dancer instead of just Dancer
>
> --
> Jakob Vo?
> Verbundzentrale des GBV (VZG) / Common Library Network
> Platz der Goettinger Sieben 1, 37073 G?ttingen, Germany
> +49 (0)551 39-10242, http://www.gbv.de/
From gabor at szabgab.com Thu Oct 2 09:27:45 2014
From: gabor at szabgab.com (Gabor Szabo)
Date: Thu, 2 Oct 2014 11:27:45 +0300
Subject: [dancer-users] DWIM Perl for Dancer-based projects
Message-ID:
Hi,
DWIM Perl for Linux is a Perl distribution that includes standard Perl + ~
800 CPAN modules.
This "batteries included" approach tries to make it easy for people to get
started with Perl on a Linux desktop or VPS.
Among the ~ 800 modules there are quite a few Dancer and Dancer2 packages.
The latest revision of 5.20.1.10 can be downloaded from here:
http://dwimperl.com/linux.html
The list of modules included can be found in the cpanfile in the GitHub
repository used for the creation of this distribution:
https://github.com/dwimperl/dwimperl-linux/blob/dwimperl-linux-5.20.1-10/cpanfile
This is only the list of required modules, there are quite a few that are
installed as prerequisites
of these modules.
Your task, if you accept it, is to try to run the applications you maintain
on DWIM Perl.
Report any problems, and report any missing modules. Either by e-mail, or
as an issue via
GitHub: https://github.com/dwimperl/dwimperl-linux/
regards
Gabor
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jack.lareau at gmail.com Thu Oct 2 20:21:17 2014
From: jack.lareau at gmail.com (Jacques Lareau)
Date: Thu, 2 Oct 2014 15:21:17 -0400
Subject: [dancer-users] Official Docker image for Dancer?
In-Reply-To:
References: <542BAA21.4010209@gbv.de>
Message-ID:
Very nice tutorial about Docker and Dancer. Thank you!
On Wed, Oct 1, 2014 at 7:50 AM, Peter Martini
wrote:
> I was hoping to make it official, just wasn't sure who I should get to
> jump in and sign off. It'd be neat to get this done in time for the
> conference :-)
>
> I also wasn't sure of the best way to handle versioning, and in particular
> Dancer v. Dancer2, so any insight or advice is appreciated.
>
> By the way, thanks for pointing me to those blog posts, and thanks to Rob
> for writing it!
>
> Sent from my iPhone
>
> > On Oct 1, 2014, at 3:15, Jakob Vo? wrote:
> >
> > Hi,
> >
> > Peter Martini has created a Docker image for Dancer, which I have
> contributed to:
> >
> > https://github.com/PeterMartini/docker-dancer
> > https://registry.hub.docker.com/u/petermartini/docker-dancer/
> >
> > If this is ok to Peter, I'd prefer this to be an official repository at
> https://github.com/PerlDancer. You should also create an Docker
> organization account for the Dancer community:
> > https://hub.docker.com/account/organizations/
> >
> > The current documentation could be extended to a tutorial.
> > Rob N already did good work here: http://robn.io/docker-perl/
> > (I'm not sure we should recommend the git glone approach as *only* way
> to build your dancer application image, one could also use "COPY" in a
> Dockerfile and "docker build"). A similar tutorial for another language is
> https://docs.docker.com/examples/nodejs_web_app/.
> >
> > Anyway: I think that an (or multiple) official Docker images for Dancer
> could improve the visibility and usability of Dancer framework a lot.
> >
> > Cheers,
> > Jakob
> >
> > P.S: If Task::Dancer wasn't stalled (no updates since 2012?!) I'd
> recommend to install Task::Dancer instead of just Dancer
> >
> > --
> > Jakob Vo?
> > Verbundzentrale des GBV (VZG) / Common Library Network
> > Platz der Goettinger Sieben 1, 37073 G?ttingen, Germany
> > +49 (0)551 39-10242, http://www.gbv.de/
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From robn at robn.io Thu Oct 2 22:38:06 2014
From: robn at robn.io (Robert Norris)
Date: Fri, 03 Oct 2014 07:38:06 +1000
Subject: [dancer-users] Official Docker image for Dancer?
In-Reply-To: <542BAA21.4010209@gbv.de>
References: <542BAA21.4010209@gbv.de>
Message-ID: <1412285886.3931360.174544049.18CF8017@webmail.messagingengine.com>
On Wed, Oct 1, 2014, at 05:15 PM, Jakob Vo? wrote:
> Peter Martini has created a Docker image for Dancer, which I have
> contributed to:
Awesome. I should try and "rebase" towncrier's image on top of it, see
how it goes.
> The current documentation could be extended to a tutorial.
> Rob N already did good work here: http://robn.io/docker-perl/
Thanks for the mention. Feel free to take the text for docs or tutorials
or whatever you like, I don't mind. Just a name and link back for
credit, as usual :)
Cheers,
Rob N.
From lrg_ml at gmx.net Fri Oct 3 12:09:51 2014
From: lrg_ml at gmx.net (Lutz Gehlen)
Date: Fri, 3 Oct 2014 13:09:51 +0200
Subject: [dancer-users] Dancer under Strawberry Perl and local::lib
Message-ID: <201410031309.51292.lrg_ml@gmx.net>
Hello all,
I have just set up Strawberry Perl and local::lib under Windows 7 and am
trying to install Dancer using cpanm. I get some permission problems,
however (see build.log below).
The problems I find in the log are the following:
cannot unlink file for C:
\Users\lgehlen\AppData\Local\Temp\08zDBkGBog\logs\prod.log: Permission
denied at C:/Strawberry/perl/lib/File/Temp.pm line 784.
cannot remove directory for C:
\Users\lgehlen\AppData\Local\Temp\08zDBkGBog\logs: Directory not empty at
C:/Strawberry/perl/lib/File/Temp.pm line 784.
cannot remove directory for C:/Users/lgehlen/AppData/Local/Temp/08zDBkGBog:
Directory not empty at C:/Strawberry/perl/lib/File/Temp.pm line 784.
[...]
[...some similar messages...]
[...]
Error in tempfile() using template \XXXXXXXXXX: Could not create temp file
\hOPQFPobHh: Permission denied at C:
\Users\lgehlen\perl5\lib\perl5/HTTP/Body/OctetStream.pm line 36.
I am not very familiar with permissions under Windows, but if I look at the
properties of \Users\lgehlen\AppData\Local\Temp\08zDBkGBog and the log
directory in there, they both have the attribute "Read-only (only applies
to files in folder)" ticked (or rather, the box is filled, which seems to be
different from ticked). While this seems to explain the problem, I have no
idea what to do about it, since these temporary directories seem to be
created during the build process.
Can anybody help?
Thanks a lot,
Lutz
Full build.log:
cpanm (App::cpanminus) 1.7009 on perl 5.020001 built for MSWin32-x64-multi-
thread
Work directory is C:\Users\lgehlen/.cpanm/work/1412333148.920
You have make C:\Strawberry\c\bin\dmake.exe
You have LWP 6.08
Falling back to Archive::Tar 2.02
Searching Dancer on cpanmetadb ...
--> Working on Dancer
Fetching http://www.cpan.org/authors/id/Y/YA/YANICK/Dancer-1.3130.tar.gz
-> OK
Unpacking Dancer-1.3130.tar.gz
Entering Dancer-1.3130
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.98)
Configuring Dancer-1.3130
Running Makefile.PL
Checking if your kit is complete...
Looks good
Generating a dmake-style Makefile
Writing Makefile for Dancer
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have File::Path 0 ... Yes (2.09)
Checking if you have File::Temp 0 ... Yes (0.2304)
Checking if you have Carp 0 ... Yes (1.3301)
Checking if you have File::Spec 0 ... Yes (3.48)
Checking if you have Scalar::Util 0 ... Yes (1.41)
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.98)
Checking if you have HTTP::Body 0 ... Yes (1.19)
Checking if you have bytes 0 ... Yes (1.04)
Checking if you have HTTP::Cookies 0 ... Yes (6.01)
Checking if you have URI 0 ... Yes (1.64)
Checking if you have IO::Handle 0 ... Yes (1.35)
Checking if you have FindBin 0 ... Yes (1.51)
Checking if you have Fcntl 0 ... Yes (1.11)
Checking if you have Exporter 0 ... Yes (5.71)
Checking if you have Time::HiRes 0 ... Yes (1.9726)
Checking if you have lib 0 ... Yes (0.63)
Checking if you have Pod::Usage 0 ... Yes (1.64)
Checking if you have URI::Escape 0 ... Yes (3.31)
Checking if you have POSIX 0 ... Yes (1.38_03)
Checking if you have Hash::Merge::Simple 0 ... Yes (0.051)
Checking if you have HTTP::Headers 0 ... Yes (6.05)
Checking if you have IO::File 0 ... Yes (1.16)
Checking if you have overload 0 ... Yes (1.22)
Checking if you have strict 0 ... Yes (1.08)
Checking if you have Test::Builder 0 ... Yes (1.001006)
Checking if you have IPC::Open3 0 ... Yes (1.16)
Checking if you have MIME::Types 0 ... Yes (2.09)
Checking if you have vars 0 ... Yes (1.03)
Checking if you have constant 0 ... Yes (1.31)
Checking if you have HTTP::Server::Simple::PSGI 0 ... Yes (0.16)
Checking if you have LWP::UserAgent 0 ... Yes (6.06)
Checking if you have Encode 0 ... Yes (2.62)
Checking if you have Plack::Builder 0 ... Yes (undef)
Checking if you have File::Spec::Functions 0 ... Yes (3.48)
Checking if you have Try::Tiny 0 ... Yes (0.22)
Checking if you have base 0 ... Yes (2.22)
Checking if you have Getopt::Long 0 ... Yes (2.42)
Checking if you have File::Copy 0 ... Yes (2.30)
Checking if you have HTTP::Request 0 ... Yes (6.00)
Checking if you have Module::Runtime 0 ... Yes (0.014)
Checking if you have HTTP::Date 0 ... Yes (6.02)
Checking if you have Devel::Hide 0 ... Yes (0.0009)
Checking if you have File::stat 0 ... Yes (1.07)
Checking if you have Cwd 0 ... Yes (3.48)
Checking if you have Test::More 0.88 ... Yes (1.001006)
Checking if you have parent 0 ... Yes (0.228)
Checking if you have warnings 0 ... Yes (1.23)
Checking if you have utf8 0 ... Yes (1.13_01)
Checking if you have File::Basename 0 ... Yes (2.85)
Checking if you have Data::Dumper 0 ... Yes (2.151)
Building and testing Dancer-1.3130
cp lib/Dancer/Continuation/Route/FileSent.pm
blib\lib\Dancer\Continuation\Route\FileSent.pm
cp lib/Dancer/Continuation/Route/Templated.pm
blib\lib\Dancer\Continuation\Route\Templated.pm
cp lib/Dancer/Continuation.pm blib\lib\Dancer\Continuation.pm
cp lib/Dancer/Cookbook.pod blib\lib\Dancer\Cookbook.pod
cp lib/Dancer/Continuation/Route.pm blib\lib\Dancer\Continuation\Route.pm
cp lib/Dancer/Continuation/Route/ErrorSent.pm
blib\lib\Dancer\Continuation\Route\ErrorSent.pm
cp lib/Dancer.pm blib\lib\Dancer.pm
cp lib/Dancer/App.pm blib\lib\Dancer\App.pm
cp lib/Dancer/Deprecation.pm blib\lib\Dancer\Deprecation.pm
cp lib/Dancer/Cookie.pm blib\lib\Dancer\Cookie.pm
cp lib/Dancer/Deployment.pod blib\lib\Dancer\Deployment.pod
cp lib/Dancer/Config.pm blib\lib\Dancer\Config.pm
cp lib/Dancer/Development/Integration.pod
blib\lib\Dancer\Development\Integration.pod
cp lib/Dancer/Development.pod blib\lib\Dancer\Development.pod
cp lib/Dancer/Continuation/Halted.pm blib\lib\Dancer\Continuation\Halted.pm
cp lib/Dancer/Continuation/Route/Passed.pm
blib\lib\Dancer\Continuation\Route\Passed.pm
cp lib/Dancer/Continuation/Route/Forwarded.pm
blib\lib\Dancer\Continuation\Route\Forwarded.pm
cp lib/Dancer/Cookies.pm blib\lib\Dancer\Cookies.pm
cp lib/Dancer/Config/Object.pm blib\lib\Dancer\Config\Object.pm
cp lib/Dancer/Logger/Capture.pm blib\lib\Dancer\Logger\Capture.pm
cp lib/Dancer/Handler/PSGI.pm blib\lib\Dancer\Handler\PSGI.pm
cp lib/Dancer/Exception/Base.pm blib\lib\Dancer\Exception\Base.pm
cp lib/Dancer/Logger/Diag.pm blib\lib\Dancer\Logger\Diag.pm
cp lib/Dancer/Hook.pm blib\lib\Dancer\Hook.pm
cp lib/Dancer/Handler/Standalone.pm blib\lib\Dancer\Handler\Standalone.pm
cp lib/Dancer/Introduction.pod blib\lib\Dancer\Introduction.pod
cp lib/Dancer/Engine.pm blib\lib\Dancer\Engine.pm
cp lib/Dancer/GetOpt.pm blib\lib\Dancer\GetOpt.pm
cp lib/Dancer/Hook/Properties.pm blib\lib\Dancer\Hook\Properties.pm
cp lib/Dancer/Handler.pm blib\lib\Dancer\Handler.pm
cp lib/Dancer/FileUtils.pm blib\lib\Dancer\FileUtils.pm
cp lib/Dancer/Error.pm blib\lib\Dancer\Error.pm
cp lib/Dancer/Logger.pm blib\lib\Dancer\Logger.pm
cp lib/Dancer/Logger/Capture/Trap.pm blib\lib\Dancer\Logger\Capture\Trap.pm
cp lib/Dancer/Factory/Hook.pm blib\lib\Dancer\Factory\Hook.pm
cp lib/Dancer/HTTP.pm blib\lib\Dancer\HTTP.pm
cp lib/Dancer/Handler/Debug.pm blib\lib\Dancer\Handler\Debug.pm
cp lib/Dancer/Logger/Abstract.pm blib\lib\Dancer\Logger\Abstract.pm
cp lib/Dancer/Exception.pm blib\lib\Dancer\Exception.pm
cp lib/Dancer/Logger/Console.pm blib\lib\Dancer\Logger\Console.pm
cp lib/Dancer/Request/Upload.pm blib\lib\Dancer\Request\Upload.pm
cp lib/Dancer/Plugin.pm blib\lib\Dancer\Plugin.pm
cp lib/Dancer/Response.pm blib\lib\Dancer\Response.pm
cp lib/Dancer/Object.pm blib\lib\Dancer\Object.pm
cp lib/Dancer/Route/Cache.pm blib\lib\Dancer\Route\Cache.pm
cp lib/Dancer/Route.pm blib\lib\Dancer\Route.pm
cp lib/Dancer/MIME.pm blib\lib\Dancer\MIME.pm
cp lib/Dancer/Plugins.pod blib\lib\Dancer\Plugins.pod
cp lib/Dancer/Logger/Null.pm blib\lib\Dancer\Logger\Null.pm
cp lib/Dancer/Renderer.pm blib\lib\Dancer\Renderer.pm
cp lib/Dancer/Plugin/Ajax.pm blib\lib\Dancer\Plugin\Ajax.pm
cp lib/Dancer/Serializer/Abstract.pm blib\lib\Dancer\Serializer\Abstract.pm
cp lib/Dancer/Route/Registry.pm blib\lib\Dancer\Route\Registry.pm
cp lib/Dancer/Object/Singleton.pm blib\lib\Dancer\Object\Singleton.pm
cp lib/Dancer/Serializer/Dumper.pm blib\lib\Dancer\Serializer\Dumper.pm
cp lib/Dancer/Serializer.pm blib\lib\Dancer\Serializer.pm
cp lib/Dancer/Request.pm blib\lib\Dancer\Request.pm
cp lib/Dancer/Serializer/JSON.pm blib\lib\Dancer\Serializer\JSON.pm
cp lib/Dancer/Logger/Note.pm blib\lib\Dancer\Logger\Note.pm
cp lib/Dancer/Logger/File.pm blib\lib\Dancer\Logger\File.pm
cp lib/Dancer/ModuleLoader.pm blib\lib\Dancer\ModuleLoader.pm
cp lib/Dancer/Template/Abstract.pm blib\lib\Dancer\Template\Abstract.pm
cp lib/Dancer/Template/TemplateToolkit.pm
blib\lib\Dancer\Template\TemplateToolkit.pm
cp lib/Dancer/Serializer/Mutable.pm blib\lib\Dancer\Serializer\Mutable.pm
cp lib/Dancer/Serializer/XML.pm blib\lib\Dancer\Serializer\XML.pm
cp lib/Dancer/Session/YAML.pm blib\lib\Dancer\Session\YAML.pm
cp lib/Dancer/Timer.pm blib\lib\Dancer\Timer.pm
cp lib/Dancer/Session.pm blib\lib\Dancer\Session.pm
cp lib/Dancer/Template/Simple.pm blib\lib\Dancer\Template\Simple.pm
cp lib/Dancer/Serializer/YAML.pm blib\lib\Dancer\Serializer\YAML.pm
cp lib/Dancer/Session/Simple.pm blib\lib\Dancer\Session\Simple.pm
cp lib/Dancer/Session/Abstract.pm blib\lib\Dancer\Session\Abstract.pm
cp lib/Dancer/Tutorial.pod blib\lib\Dancer\Tutorial.pod
cp lib/Dancer/Test.pm blib\lib\Dancer\Test.pm
cp lib/Dancer/Template.pm blib\lib\Dancer\Template.pm
cp lib/Dancer/Serializer/JSONP.pm blib\lib\Dancer\Serializer\JSONP.pm
cp lib/Dancer/SharedData.pm blib\lib\Dancer\SharedData.pm
C:\Strawberry\perl\bin\perl.exe -MExtUtils::Command -e cp -- bin/dancer
blib\script\dancer
pl2bat.bat blib\script\dancer
C:\Strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-MTest::Harness"
"-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib',
'blib\arch')" t/*.t t/00_base/*.t t/01_config/*.t t/02_request/*.t
t/03_route_handler/*.t t/04_static_file/*.t t/05_views/*.t t/06_helpers/*.t
t/07_apphandlers/*.t t/08_session/*.t t/09_cookies/*.t t/10_template/*.t
t/11_logger/*.t t/12_response/*.t t/13_engines/*.t t/14_serializer/*.t
t/15_plugins/*.t t/16_timer/*.t t/17_apps/*.t t/19_dancer/*.t
t/20_deprecation/*.t t/21_dependents/*.t t/22_hooks/*.t
t/23_dancer_tests/*.t t/24_deployment/*.t t/25_exceptions/*.t
t/00-compile.t ...................................... ok
#
#
# Generated by Dist::Zilla::Plugin::ReportVersions::Tiny v1.10
# perl: 5.020001 (wanted 5.006) on MSWin32 from C:
\Strawberry\perl\bin\perl.exe
#
# Carp => 1.3301 (want any
version)
# Cwd => 3.48 (want any
version)
# Data::Dumper => 2.151 (want any
version)
# Devel::Hide => 0.0009 (want any
version)
# Encode => 2.62 (want any
version)
# Exporter => 5.71 (want any
version)
# ExtUtils::MakeMaker => 6.98 (want any
version)
# Fcntl => 1.11 (want any
version)
# File::Basename => 2.85 (want any
version)
# File::Copy => 2.30 (want any
version)
# File::Path => 2.09 (want any
version)
# File::Spec => 3.48 (want any
version)
# File::Spec::Functions => 3.48 (want any
version)
# File::Temp => 0.2304 (want any
version)
# File::stat => 1.07 (want any
version)
# FindBin => 1.51 (want any
version)
# Getopt::Long => 2.42 (want any
version)
# HTTP::Body => 1.19 (want any
version)
# HTTP::Cookies => 6.01 (want any
version)
# HTTP::Date => 6.02 (want any
version)
# HTTP::Headers => 6.05 (want any
version)
# HTTP::Request => 6.00 (want any
version)
# HTTP::Server::Simple::PSGI => 0.16 (want any
version)
# Hash::Merge::Simple => 0.051 (want any
version)
# IO::File => 1.16 (want any
version)
# IO::Handle => 1.35 (want any
version)
# IPC::Open3 => 1.16 (want any
version)
# LWP::UserAgent => 6.06 (want any
version)
# MIME::Types => 2.09 (want any
version)
# Module::Runtime => 0.014 (want any
version)
# POSIX => 1.38_03 (want any
version)
# Plack::Builder => (want any
version)
# Pod::Usage => 1.64 (want any
version)
# Scalar::Util => 1.41 (want any
version)
# Test::Builder => 1.001006 (want any
version)
# Test::More => 1.001006 (want 0.88)
# Time::HiRes => 1.9726 (want any
version)
# Try::Tiny => 0.22 (want any
version)
# URI => 1.64 (want any
version)
# URI::Escape => 3.31 (want any
version)
# base => 2.22 (want any
version)
# bytes => 1.04 (want any
version)
# constant => 1.31 (want any
version)
# lib => 0.63 (want any
version)
# overload => 1.22 (want any
version)
# parent => 0.228 (want any
version)
# strict => 1.08 (want any
version)
# utf8 => 1.13_01 (want any
version)
# vars => 1.03 (want any
version)
# warnings => 1.23 (want any
version)
#
# Thanks for using my code. I hope it works for you.
# If not, please try and include this output in the bug report.
# That will help me reproduce the issue and solve your problem.
#
t/000-report-versions-tiny.t ........................ ok
t/00_base/000_create_fake_env.t ..................... ok
# Testing Dancer 1.3130, Perl 5.020001, C:\Strawberry\perl\bin\perl.exe
t/00_base/001_load.t ................................ ok
t/00_base/002_strict_and_warnings.t ................. ok
t/00_base/003_syntax.t .............................. ok
t/00_base/004_args.t ................................ ok
t/00_base/005_module_loader.t ....................... ok
t/00_base/007_load_syntax.t ......................... ok
t/00_base/008_export.t .............................. ok
t/00_base/009_syntax_export.t ....................... ok
t/00_base/010_export_script.t ....................... ok
t/00_base/06_dancer_object.t ........................ ok
t/00_base/08_pod_coverage_dancer.t .................. skipped:
Test::Pod::Coverage 1.08 required for testing POD coverage
t/00_base/09_load_app.t ............................. ok
t/00_base/11_file_utils.t ........................... ok
t/00_base/12_utf8_charset.t ......................... skipped: skip test
with Test::TCP in win32
t/00_base/13_dancer_singleton.t ..................... ok
t/00_base/15_dependent_modules.t .................... skipped: Author tests
not required for installation
t/00_base/16_version.t .............................. ok
t/00_base/17_globalwarnings_config_on.t ............. ok
t/00_base/config.t .................................. ok
t/00_base/normalize_path.t .......................... ok
# Test::TCP 2.06 loaded successfully
# Test::More 1.001006 loaded successfully
# JSON 2.90 loaded successfully
# YAML 1.12 loaded successfully
# Clone 0.37 loaded successfully
# Plack 1.0031 loaded successfully
# XML::Simple 2.20 loaded successfully
# HTTP::Parser::XS is not available
t/00_base/optional-module-versions.t ................ ok
t/00_base/uri_for.t ................................. ok
t/01_config/01_settings.t ........................... ok
t/01_config/02_mime_type.t .......................... ok
t/01_config/03_logger.t ............................. ok
t/01_config/04_config_file.t ........................ ok
t/01_config/05_serializers.t ........................ ok
t/01_config/06_config_api.t ......................... ok
t/01_config/06_stack_trace.t ........................ ok
t/01_config/07_strict_config.t ...................... ok
cannot unlink file for C:
\Users\lgehlen\AppData\Local\Temp\08zDBkGBog\logs\prod.log: Permission
denied at C:/Strawberry/perl/lib/File/Temp.pm line 784.
cannot remove directory for C:
\Users\lgehlen\AppData\Local\Temp\08zDBkGBog\logs: Directory not empty at
C:/Strawberry/perl/lib/File/Temp.pm line 784.
cannot remove directory for C:/Users/lgehlen/AppData/Local/Temp/08zDBkGBog:
Directory not empty at C:/Strawberry/perl/lib/File/Temp.pm line 784.
t/01_config/08_environments.t ....................... ok
t/01_config/yaml_dependency.t ....................... ok
t/02_request/000_create_fake_env.t .................. ok
t/02_request/01_load.t .............................. ok
t/02_request/04_custom.t ............................ ok
t/02_request/04_forward.t ........................... ok
t/02_request/05_cgi_pm_compat.t ..................... ok
t/02_request/06_init_env.t .......................... ok
t/02_request/07_raw_data.t .......................... skipped: skip test
with Test::TCP in win32
t/02_request/08_params.t ............................ ok
t/02_request/10_mixed_params.t ...................... skipped: skip test
with Test::TCP in win32
t/02_request/11_accessors.t ......................... ok
t/02_request/12_base.t .............................. ok
t/02_request/13_ajax.t .............................. skipped: skip test
with Test::TCP in win32
t/02_request/14_uploads.t ........................... ok
t/02_request/15_headers.t ........................... skipped: skip test
with Test::TCP in win32
t/02_request/16_delete.t ............................ ok
t/02_request/17_uri_base.t .......................... ok
t/02_request/18_param_accessor.t .................... ok
t/03_route_handler/01_http_methods.t ................ ok
t/03_route_handler/02_params.t ...................... ok
t/03_route_handler/03_routes_api.t .................. ok
t/03_route_handler/04_routes_matching.t ............. ok
t/03_route_handler/04_wildcards_megasplat.t ......... ok
t/03_route_handler/05_filter.t ...................... ok
t/03_route_handler/05_unicode.t ..................... ok
t/03_route_handler/06_redirect.t .................... ok
t/03_route_handler/07_compilation_warning.t ......... ok
t/03_route_handler/08_errors.t ...................... ok
t/03_route_handler/12_response.t .................... ok
t/03_route_handler/12_response_halt.t ............... ok
t/03_route_handler/14_options.t ..................... ok
t/03_route_handler/15_prefix.t ...................... ok
t/03_route_handler/16_caching.t ..................... ok
t/03_route_handler/16_embedded_prefixes.t ........... ok
t/03_route_handler/18_auto_page.t ................... ok
t/03_route_handler/21_ajax.t ........................ skipped: skip test
with Test::TCP in win32
t/03_route_handler/23_filter_error_catching.t ....... ok
t/03_route_handler/24_multiple_params.t ............. ok
t/03_route_handler/24_named_captures.t .............. ok
t/03_route_handler/28_plack_mount.t ................. skipped: skip test
with Test::TCP in win32
t/03_route_handler/29_forward.t ..................... ok
t/03_route_handler/29_redirect_immediately.t ........ ok
t/03_route_handler/30_forward_session.t ............. ok
t/03_route_handler/31_infinite_loop.t ............... ok
t/03_route_handler/33_vars.t ........................ skipped: skip test
with Test::TCP in win32
t/03_route_handler/34_forward_body_post.t ........... skipped: skip test
with Test::TCP in win32
t/03_route_handler/35_no_further_routes.t ........... ok
t/03_route_handler/36_false_routes.t ................ ok
t/03_route_handler/99_bugs.t ........................ ok
t/04_static_file/001_base.t ......................... skipped: Skip test
with Test::TCP in win32
t/04_static_file/003_mime_types_reinit.t ............ ok
t/04_static_file/01_mime_types.t .................... ok
t/04_static_file/02_dir_traversal.t ................. ok
t/05_views/002_view_rendering.t ..................... ok
t/05_views/03_layout.t .............................. ok
t/06_helpers/000_create_fake_env.t .................. ok
t/06_helpers/01_send_file.t ......................... ok
t/06_helpers/02_http_status.t ....................... ok
t/06_helpers/03_content_type.t ...................... ok
t/06_helpers/04_status.t ............................ ok
t/06_helpers/05_send_error.t ........................ ok
t/06_helpers/06_load.t .............................. ok
t/07_apphandlers/000_create_fake_env.t .............. ok
t/07_apphandlers/01_base.t .......................... ok
t/07_apphandlers/02_apache2_plack.t ................. ok
t/07_apphandlers/03_psgi_app.t ...................... skipped: skip test
with Test::TCP in win32
t/07_apphandlers/04_standalone_app.t ................ skipped: skip test
with Test::TCP in win32
t/07_apphandlers/05_middlewares.t ................... skipped: skip test
with Test::TCP in win32
t/07_apphandlers/05_psgi_api.t ...................... ok
t/07_apphandlers/06_debug.t ......................... ok
t/07_apphandlers/07_middleware_map.t ................ skipped: skip test
with Test::TCP in win32
t/07_apphandlers/08_is_text.t ....................... ok
t/08_session/000_create_fake_env.t .................. ok
t/08_session/01_load.t .............................. ok
t/08_session/02_dependency_check.t .................. ok
t/08_session/03_http_requests.t ..................... skipped: skip test
with Test::TCP in win32
t/08_session/04_api.t ............................... ok
t/08_session/05_yaml.t .............................. ok
t/08_session/06_abstract.t .......................... ok
t/08_session/07_session_expires.t ................... skipped: skip test
with Test::TCP in win32
t/08_session/08_simple.t ............................ ok
t/08_session/09_session.t ........................... ok
t/08_session/10_filter.t ............................ ok
t/08_session/11_session_secure.t .................... ok
t/08_session/12_session_name.t ...................... ok
t/08_session/13_session_httponly.t .................. skipped: skip test
with Test::TCP in win32
t/08_session/14_session_domain.t .................... ok
t/09_cookies/000_create_fake_env.t .................. ok
t/09_cookies/01_use.t ............................... ok
t/09_cookies/02_cookie_object.t ..................... ok
t/09_cookies/03_persistence.t ....................... skipped: skip test
with Test::TCP in win32
t/09_cookies/04_secure.t ............................ ok
t/09_cookies/05_api.t ............................... ok
t/09_cookies/06_expires.t ........................... ok
t/10_template/000_create_fake_env.t ................. ok
t/10_template/01_factory.t .......................... ok
t/10_template/02_abstract_class.t ................... ok
t/10_template/03_simple.t ........................... ok
t/10_template/05_template_toolkit.t ................. ok
t/10_template/extension.t ........................... ok
t/10_template/template.t ............................ ok
t/11_logger/000_create_fake_env.t ................... ok
t/11_logger/01_abstract.t ........................... ok
t/11_logger/02_factory.t ............................ ok
cannot unlink file for C:
\Users\lgehlen\AppData\Local\Temp\oiJ1h7qUfs\foo.bar: Permission denied at
C:/Strawberry/perl/lib/File/Temp.pm line 784.
cannot remove directory for C:/Users/lgehlen/AppData/Local/Temp/oiJ1h7qUfs:
Directory not empty at C:/Strawberry/perl/lib/File/Temp.pm line 784.
t/11_logger/03_file.t ............................... ok
t/11_logger/04_console.t ............................ ok
t/11_logger/05_format.t ............................. ok
t/11_logger/06_null.t ............................... ok
t/11_logger/07_diag.t ............................... ok
t/11_logger/08_serialize.t .......................... ok
t/11_logger/09_capture.t ............................ ok
t/11_logger/10_note.t ............................... ok
cannot unlink file for C:
\Users\lgehlen\AppData\Local\Temp\evEBkvaJ2T\logs\development.log:
Permission denied at C:/Strawberry/perl/lib/File/Temp.pm line 784.
cannot remove directory for C:
\Users\lgehlen\AppData\Local\Temp\evEBkvaJ2T\logs: Directory not empty at
C:/Strawberry/perl/lib/File/Temp.pm line 784.
cannot remove directory for C:/Users/lgehlen/AppData/Local/Temp/evEBkvaJ2T:
Directory not empty at C:/Strawberry/perl/lib/File/Temp.pm line 784.
t/11_logger/11_runtime_file.t ....................... ok
t/12_response/000_create_fake_env.t ................. ok
t/12_response/01_CRLF_injection.t ................... ok
t/12_response/02_headers.t .......................... ok
t/12_response/03_charset.t .......................... ok
t/12_response/04_charset_server.t ................... skipped: skip test
with Test::TCP in win32
t/12_response/05_api.t .............................. ok
t/12_response/06_filter_halt_status.t ............... ok
t/12_response/07_cookies.t .......................... ok
t/12_response/08_drop_content.t ..................... skipped: skip test
with Test::TCP in win32
t/12_response/09_headers_to_array.t ................. ok
Data exceeding 100 levels, truncating
t/12_response/10_error_dumper.t ..................... ok
Devel::Hide hides Clone.pm
t/12_response/10_error_dumper_without_clone.t ....... ok
t/12_response/11_CVE-2012-5572.t .................... ok
t/13_engines/00_load.t .............................. ok
t/13_engines/02_template_init.t ..................... ok
t/14_serializer/01_helpers.t ........................ ok
t/14_serializer/02_request_json.t ................... ok
t/14_serializer/03_request_yaml.t ................... ok
t/14_serializer/04_request_xml.t .................... ok
t/14_serializer/05_request_mutable.t ................ ok
Error in tempfile() using template \XXXXXXXXXX: Could not create temp file
\hOPQFPobHh: Permission denied at C:
\Users\lgehlen\perl5\lib\perl5/HTTP/Body/OctetStream.pm line 36.
# Looks like you planned 18 tests but ran 15.
# Looks like your test exited with 13 just after 15.
t/14_serializer/06_api.t ............................
Dubious, test returned 13 (wstat 3328, 0xd00)
Failed 3/18 subtests
t/14_serializer/07_request_jsonp.t .................. ok
t/14_serializer/17_clear_serializer.t ............... skipped: skip test
with Test::TCP in win32
t/14_serializer/18_mutable_template_or_serialize.t .. ok
t/14_serializer/99_bugs.t ........................... ok
t/15_plugins/000_create_fake_env.t .................. ok
t/15_plugins/01_register.t .......................... ok
t/15_plugins/02_config.t ............................ ok
t/15_plugins/03_namespace.t ......................... ok
t/15_plugins/04_apps_and_plugins.t .................. ok
t/15_plugins/05_keywords.t .......................... ok
t/15_plugins/05_plugins_and_OO.t .................... ok
t/15_plugins/05b_plugins_and_c3.t ................... ok
t/15_plugins/06_hook.t .............................. ok
t/15_plugins/07_ajax_plack_builder.t ................ skipped: skip test
with Test::TCP in win32
t/16_timer/00_base.t ................................ ok
t/17_apps/000_create_fake_env.t ..................... ok
t/17_apps/00_base.t ................................. ok
t/17_apps/01_settings.t ............................. ok
t/17_apps/02_load_app.t ............................. ok
t/17_apps/03_prefix.t ............................... ok
t/17_apps/05_api.t .................................. ok
t/19_dancer/01_script.t ............................. ok
t/19_dancer/02_script_version_from.t ................ ok
t/20_deprecation/01_api.t ........................... ok
t/21_dependents/Dancer-Session-Cookie.t ............. skipped:
Dancer::Session::Cookie 0.14 required
t/22_hooks/00_syntax.t .............................. ok
t/22_hooks/01_api.t ................................. ok
t/22_hooks/02_before.t .............................. ok
t/22_hooks/03_after.t ............................... ok
t/22_hooks/04_template.t ............................ ok
t/22_hooks/05_layout.t .............................. ok
t/22_hooks/06_serializer.t .......................... ok
t/22_hooks/07_file.t ................................ ok
t/22_hooks/08_error.t ............................... ok
t/22_hooks/09_before_error_init.t ................... ok
t/22_hooks/10_error_in_hook.t ....................... ok
t/22_hooks/11_error_in_hook.t ....................... ok
t/23_dancer_tests/01_basic.t ........................ ok
t/23_dancer_tests/02_tests_functions.t .............. ok
t/23_dancer_tests/03_uris.t ......................... ok
t/24_deployment/01_multi_webapp.t ................... skipped: skip test
with Test::TCP in win32
t/25_exceptions/01_exceptions.t ..................... ok
t/25_exceptions/02_exceptions.t ..................... ok
t/25_exceptions/03_exceptions.t ..................... ok
t/25_exceptions/04_exceptions_warn.t ................ ok
t/manifest.t ........................................ skipped: Author tests
not required for installation
t/pod.t ............................................. skipped: Author tests
not required for installation
Test Summary Report
-------------------
t/14_serializer/06_api.t (Wstat: 3328 Tests: 15
Failed: 0)
Non-zero exit status: 13
Parse errors: Bad plan. You planned 18 tests but ran 15.
Files=215, Tests=1808, 110 wallclock secs ( 0.91 usr + 0.27 sys = 1.17
CPU)
Result: FAIL
Failed 1/215 test programs. 0/1808 subtests failed.
dmake.exe: Error code 255, while making 'test_dynamic'
-> FAIL Installing Dancer failed. See C:
\Users\lgehlen\.cpanm\work\1412333148.920\build.log for details. Retry with
--force to force install it.
From xsawyerx at gmail.com Fri Oct 3 18:50:48 2014
From: xsawyerx at gmail.com (Sawyer X)
Date: Fri, 3 Oct 2014 19:50:48 +0200
Subject: [dancer-users] Dancer Plugins Maintainers team on Github
In-Reply-To:
References:
<20140914231257.GA11440@gilgamesh.babyl.dyndns.org>
Message-ID:
Sarah, you've been added to the plugins maintainers group. :)
Henk, I will need your Github account ID.
On Wed, Oct 1, 2014 at 3:37 PM, Sarah Fuller wrote:
> If people think I can be of any use, I'd be interested in helping out.
> Love Dancer and can code a bit. On github: averna-syd
>
> On Sat, Sep 27, 2014 at 7:34 AM, Henk van Oers wrote:
>
>>
>> On Sun, 14 Sep 2014, Yanick Champoux wrote:
>> [...]
>>
>>> .. btw, is it me, or is that group could also be
>>> named "the X-Men"? :-)
>>>
>>
>> Aha, that's why I can't adopt James Aitken's module.
>> I have no X...
>> _______________________________________________
>> dancer-users mailing list
>> dancer-users at dancer.pm
>> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>>
>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From xsawyerx at gmail.com Fri Oct 3 19:22:17 2014
From: xsawyerx at gmail.com (Sawyer X)
Date: Fri, 3 Oct 2014 20:22:17 +0200
Subject: [dancer-users] DWIM Perl for Dancer-based projects
In-Reply-To:
References:
Message-ID:
Way to go! :)
On Thu, Oct 2, 2014 at 10:27 AM, Gabor Szabo wrote:
> Hi,
>
> DWIM Perl for Linux is a Perl distribution that includes standard Perl + ~
> 800 CPAN modules.
> This "batteries included" approach tries to make it easy for people to get
> started with Perl on a Linux desktop or VPS.
>
> Among the ~ 800 modules there are quite a few Dancer and Dancer2 packages.
>
> The latest revision of 5.20.1.10 can be downloaded from here:
> http://dwimperl.com/linux.html
>
> The list of modules included can be found in the cpanfile in the GitHub
> repository used for the creation of this distribution:
>
> https://github.com/dwimperl/dwimperl-linux/blob/dwimperl-linux-5.20.1-10/cpanfile
> This is only the list of required modules, there are quite a few that are
> installed as prerequisites
> of these modules.
>
> Your task, if you accept it, is to try to run the applications you
> maintain on DWIM Perl.
> Report any problems, and report any missing modules. Either by e-mail, or
> as an issue via
> GitHub: https://github.com/dwimperl/dwimperl-linux/
>
>
> regards
> Gabor
>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From xsawyerx at gmail.com Fri Oct 3 19:22:17 2014
From: xsawyerx at gmail.com (Sawyer X)
Date: Fri, 3 Oct 2014 20:22:17 +0200
Subject: [dancer-users] DWIM Perl for Dancer-based projects
In-Reply-To:
References:
Message-ID:
Way to go! :)
On Thu, Oct 2, 2014 at 10:27 AM, Gabor Szabo wrote:
> Hi,
>
> DWIM Perl for Linux is a Perl distribution that includes standard Perl + ~
> 800 CPAN modules.
> This "batteries included" approach tries to make it easy for people to get
> started with Perl on a Linux desktop or VPS.
>
> Among the ~ 800 modules there are quite a few Dancer and Dancer2 packages.
>
> The latest revision of 5.20.1.10 can be downloaded from here:
> http://dwimperl.com/linux.html
>
> The list of modules included can be found in the cpanfile in the GitHub
> repository used for the creation of this distribution:
>
> https://github.com/dwimperl/dwimperl-linux/blob/dwimperl-linux-5.20.1-10/cpanfile
> This is only the list of required modules, there are quite a few that are
> installed as prerequisites
> of these modules.
>
> Your task, if you accept it, is to try to run the applications you
> maintain on DWIM Perl.
> Report any problems, and report any missing modules. Either by e-mail, or
> as an issue via
> GitHub: https://github.com/dwimperl/dwimperl-linux/
>
>
> regards
> Gabor
>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From yanick at babyl.dyndns.org Fri Oct 3 20:10:40 2014
From: yanick at babyl.dyndns.org (Yanick Champoux)
Date: Fri, 03 Oct 2014 15:10:40 -0400
Subject: [dancer-users] DWIM Perl for Dancer-based projects
In-Reply-To:
References:
Message-ID: <542EF4B0.1050709@babyl.dyndns.org>
On 14-10-02 04:27 AM, Gabor Szabo wrote:
> DWIM Perl for Linux is a Perl distribution that includes standard Perl +
> ~ 800 CPAN modules.
> This "batteries included" approach tries to make it easy for people to
> get started with Perl on a Linux desktop or VPS.
>
> Among the ~ 800 modules there are quite a few Dancer and Dancer2 packages.
Niiice. :-)
Joy,
`/anick
From andrew at illywhacker.net Sat Oct 4 07:26:11 2014
From: andrew at illywhacker.net (Andrew Solomon)
Date: Sat, 4 Oct 2014 07:26:11 +0100
Subject: [dancer-users] advent.perldancer.org
Message-ID:
If you google for "dancer starman config" the first link is to
http://advent.perldancer.org/2010/14
which returns a 502 'Bad Gateway'. Is this an intentional restructure
or has it fallen over?:)
Andrew
From davidp at preshweb.co.uk Sat Oct 4 09:25:06 2014
From: davidp at preshweb.co.uk (David Precious)
Date: Sat, 4 Oct 2014 09:25:06 +0100
Subject: [dancer-users] advent.perldancer.org
In-Reply-To:
References:
Message-ID: <20141004092506.79398435@columbia>
On Sat, 4 Oct 2014 07:26:11 +0100
Andrew Solomon wrote:
> If you google for "dancer starman config" the first link is to
>
> http://advent.perldancer.org/2010/14
>
> which returns a 502 'Bad Gateway'. Is this an intentional restructure
> or has it fallen over?:)
Nope, not intentional - looks like it was knocked out by a hasty
upgrade to patch the Shellshock vulnerability.
Fixed now - thanks!
From andy at andybev.com Sun Oct 5 18:52:47 2014
From: andy at andybev.com (Andrew Beverley)
Date: Sun, 05 Oct 2014 18:52:47 +0100
Subject: [dancer-users] Bug with setting behind_proxy in config file?
Message-ID: <1412531567.1572.14.camel@andy-laptop>
Hi guys,
It seems that behind_proxy can't be set in a config file. As far as I
can tell, the default settings in _build_config() in
Dancer2::Core::Runner are taking precedence (behing_proxy => 0)
If I "set behind_proxy => 1" in my application then everything works as
expected, but not if I specify it in a config file.
I'm happy to investigate further and provide patches as required, but
thought it worth running it by this mailing list first.
Thanks,
Andy
From jeff at endpoint.com Mon Oct 6 22:46:18 2014
From: jeff at endpoint.com (Jeff Boes)
Date: Mon, 06 Oct 2014 17:46:18 -0400
Subject: [dancer-users] JSON exception return values
Message-ID: <54330DAA.1000108@endpoint.com>
When one of my Dancer (1) JSON-enabled routes dies, I get an object back that looks like this:
{
"exception" : "some text here",
"error" : "some text here"
}
Recently, I accidentally added a "die" statement with a parameter that wasn't a scalar. (Spoiler: it was a hashref.) I
was surprised to see this:
{
"exception" : {
"state_iso_code" : "'(undef)' not a US state or province'",
"address" : "blank"
},
"error" : "HASH(0x731ce28)"
}
Woo, that's pretty cool, I thought. I can use that. But how the heck did I do that? I'd like to have a bit more control,
like supplying a general "your form failed" message instead of the "HASH()" stringified value.
I searched the code base, but as you may expect, "exception" and "error" are grep-proof strings to some extent.
--
Jeff Boes <><
jeff at endpoint.com
269-408-0811
From sarah at averna.id.au Wed Oct 8 09:29:32 2014
From: sarah at averna.id.au (Sarah Fuller)
Date: Wed, 8 Oct 2014 19:29:32 +1100
Subject: [dancer-users] Dancer Plugins Maintainers team on Github
In-Reply-To:
References:
<20140914231257.GA11440@gilgamesh.babyl.dyndns.org>
Message-ID:
Thanks for giving a chance Sawyer. Kinda wondering where on eath to start.
Maybe someone could throw me a few things to get started?
On 04/10/2014 3:51 AM, "Sawyer X" wrote:
> Sarah, you've been added to the plugins maintainers group. :)
>
> Henk, I will need your Github account ID.
>
> On Wed, Oct 1, 2014 at 3:37 PM, Sarah Fuller wrote:
>
>> If people think I can be of any use, I'd be interested in helping out.
>> Love Dancer and can code a bit. On github: averna-syd
>>
>> On Sat, Sep 27, 2014 at 7:34 AM, Henk van Oers wrote:
>>
>>>
>>> On Sun, 14 Sep 2014, Yanick Champoux wrote:
>>> [...]
>>>
>>>> .. btw, is it me, or is that group could also be
>>>> named "the X-Men"? :-)
>>>>
>>>
>>> Aha, that's why I can't adopt James Aitken's module.
>>> I have no X...
>>> _______________________________________________
>>> dancer-users mailing list
>>> dancer-users at dancer.pm
>>> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>>>
>>
>>
>> _______________________________________________
>> dancer-users mailing list
>> dancer-users at dancer.pm
>> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>>
>>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From xsawyerx at gmail.com Wed Oct 8 19:24:31 2014
From: xsawyerx at gmail.com (Sawyer X)
Date: Wed, 8 Oct 2014 20:24:31 +0200
Subject: [dancer-users] Dancer Plugins Maintainers team on Github
In-Reply-To:
References:
<20140914231257.GA11440@gilgamesh.babyl.dyndns.org>
Message-ID:
Happily!
Is there a direction you would like to start with?
There is a tag that we try to maintain on the Github issues defining work
that is suitable for a new-comer, or someone who isn't familiar with the
codebase yet. We are always also willing to guide you through your
contributions.
https://github.com/PerlDancer/Dancer2/issues?q=is%3Aopen+is%3Aissue+label%3A%22Beginner+Suitable%22
On Wed, Oct 8, 2014 at 10:29 AM, Sarah Fuller wrote:
> Thanks for giving a chance Sawyer. Kinda wondering where on eath to start.
> Maybe someone could throw me a few things to get started?
> On 04/10/2014 3:51 AM, "Sawyer X" wrote:
>
>> Sarah, you've been added to the plugins maintainers group. :)
>>
>> Henk, I will need your Github account ID.
>>
>> On Wed, Oct 1, 2014 at 3:37 PM, Sarah Fuller wrote:
>>
>>> If people think I can be of any use, I'd be interested in helping out.
>>> Love Dancer and can code a bit. On github: averna-syd
>>>
>>> On Sat, Sep 27, 2014 at 7:34 AM, Henk van Oers
>>> wrote:
>>>
>>>>
>>>> On Sun, 14 Sep 2014, Yanick Champoux wrote:
>>>> [...]
>>>>
>>>>> .. btw, is it me, or is that group could also be
>>>>> named "the X-Men"? :-)
>>>>>
>>>>
>>>> Aha, that's why I can't adopt James Aitken's module.
>>>> I have no X...
>>>> _______________________________________________
>>>> dancer-users mailing list
>>>> dancer-users at dancer.pm
>>>> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>>>>
>>>
>>>
>>> _______________________________________________
>>> dancer-users mailing list
>>> dancer-users at dancer.pm
>>> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>>>
>>>
>>
>> _______________________________________________
>> dancer-users mailing list
>> dancer-users at dancer.pm
>> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>>
>>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From xsawyerx at gmail.com Wed Oct 8 20:04:23 2014
From: xsawyerx at gmail.com (Sawyer X)
Date: Wed, 8 Oct 2014 21:04:23 +0200
Subject: [dancer-users] Official Docker image for Dancer?
In-Reply-To: <1412285886.3931360.174544049.18CF8017@webmail.messagingengine.com>
References: <542BAA21.4010209@gbv.de>
<1412285886.3931360.174544049.18CF8017@webmail.messagingengine.com>
Message-ID:
Let's formalize it even more:
1. I'd love to put it as a repo in under PerlDancer. We could have the repo
contain two images: one for Dancer and one for Dancer2. We could also keep
two repos. What do you fellows think? :)
2. How about we add Dancer2::Manual::Docker? One could be made for Dancer
v1 too.
3. How about an article for Advent Calendar? :)
Great work, really!
On Thu, Oct 2, 2014 at 11:38 PM, Robert Norris wrote:
> On Wed, Oct 1, 2014, at 05:15 PM, Jakob Vo? wrote:
> > Peter Martini has created a Docker image for Dancer, which I have
> > contributed to:
>
> Awesome. I should try and "rebase" towncrier's image on top of it, see
> how it goes.
>
> > The current documentation could be extended to a tutorial.
> > Rob N already did good work here: http://robn.io/docker-perl/
>
> Thanks for the mention. Feel free to take the text for docs or tutorials
> or whatever you like, I don't mind. Just a name and link back for
> credit, as usual :)
>
> Cheers,
> Rob N.
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From sukria at gmail.com Thu Oct 9 09:34:28 2014
From: sukria at gmail.com (Alexis Sukrieh)
Date: Thu, 9 Oct 2014 10:34:28 +0200
Subject: [dancer-users] Official Docker image for Dancer?
In-Reply-To:
References: <542BAA21.4010209@gbv.de>
<1412285886.3931360.174544049.18CF8017@webmail.messagingengine.com>
Message-ID:
+1 to everything Sawyer said :)
2014-10-08 21:04 GMT+02:00 Sawyer X :
> Let's formalize it even more:
> 1. I'd love to put it as a repo in under PerlDancer. We could have the
> repo contain two images: one for Dancer and one for Dancer2. We could also
> keep two repos. What do you fellows think? :)
> 2. How about we add Dancer2::Manual::Docker? One could be made for Dancer
> v1 too.
> 3. How about an article for Advent Calendar? :)
>
> Great work, really!
>
>
> On Thu, Oct 2, 2014 at 11:38 PM, Robert Norris wrote:
>
>> On Wed, Oct 1, 2014, at 05:15 PM, Jakob Vo? wrote:
>> > Peter Martini has created a Docker image for Dancer, which I have
>> > contributed to:
>>
>> Awesome. I should try and "rebase" towncrier's image on top of it, see
>> how it goes.
>>
>> > The current documentation could be extended to a tutorial.
>> > Rob N already did good work here: http://robn.io/docker-perl/
>>
>> Thanks for the mention. Feel free to take the text for docs or tutorials
>> or whatever you like, I don't mind. Just a name and link back for
>> credit, as usual :)
>>
>> Cheers,
>> Rob N.
>> _______________________________________________
>> dancer-users mailing list
>> dancer-users at dancer.pm
>> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>>
>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
--
Alexis Sukrieh
http://twitter.com/sukria - http://blog.sukria.net
"People get annoyed when you try to debug them." -- Larry Wall
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From andy at andybev.com Thu Oct 9 12:47:36 2014
From: andy at andybev.com (Andrew Beverley)
Date: Thu, 09 Oct 2014 12:47:36 +0100
Subject: [dancer-users] Incorrect attempts to serialize HTML
Message-ID: <1412855256.17038.12.camel@andy-laptop>
Hi guys,
I apologise in advance that this is rather vague, but I'm hoping that
someone might be able to point me in the right direction of where I
should be looking.
I'm getting some strange problems with Dancer2 and the "auto
serializer". I have
set serializer => 'JSON';
in my app, but under some circumstances it is trying to serialize HTML
content, with the subsequent errors that you would expect of such an
action.
The problems seem to be related to my error handling (using
Log::Report). My implementation is currently rather poor and
complicated, so I won't go into the details here, but I wondered whether
someone can point me to the relevant parts of the Dancer2 code that I
should start poking around in (in particular the code which detects
whether to serialize the data). I've looked at serialize() in
Serializer::Mutuble, but as far as I can tell this function is not being
called. Where else should I look?
If I remove the aforementioned serializer statement then everything
works as expected.
Thanks,
Andy
From xsawyerx at gmail.com Thu Oct 9 18:43:02 2014
From: xsawyerx at gmail.com (Sawyer X)
Date: Thu, 9 Oct 2014 19:43:02 +0200
Subject: [dancer-users] Incorrect attempts to serialize HTML
In-Reply-To: <1412855256.17038.12.camel@andy-laptop>
References: <1412855256.17038.12.camel@andy-laptop>
Message-ID:
On Thu, Oct 9, 2014 at 1:47 PM, Andrew Beverley wrote:
> Hi guys,
>
Hi Andrew. :)
>
> I apologise in advance that this is rather vague, but I'm hoping that
> someone might be able to point me in the right direction of where I
> should be looking.
>
Not at all! That is an excellent question.
>
> [...] so I won't go into the details here, but I wondered whether
> someone can point me to the relevant parts of the Dancer2 code that I
> should start poking around in (in particular the code which detects
> whether to serialize the data).
You can see that Dancer2::Core::Request checks for a supported content
type. The line is:
return unless $self->serializer->support_content_type($content_type);
However, in Dancer2::Core::Response, it doesn't check for a supported
content type in the request in order to serialize a response back. This
would be the correct behavior since a serializer basically says "I would
like to serialize my responses" and not "I would like to serialize my
responses IF the request was made with a header". The reason it ignores any
request header in the response is because it is, by definition, a *request*
header. This means it only relates to the request, not the response.
If you would like to return HTML and serialized information, you have two
options:
1. Separate the code that accepts and returns serialized data into two
different Dancer2 apps.
2. Don't use a serializer, and call the to_json and from_json when *you*
decide it's the right time for it.
I hope this answer helps.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From yanick at babyl.dyndns.org Sat Oct 11 20:07:44 2014
From: yanick at babyl.dyndns.org (Yanick Champoux)
Date: Sat, 11 Oct 2014 15:07:44 -0400
Subject: [dancer-users] Dancer1 v1.3131_0 on its way to CPAN
Message-ID: <54398000.6000706@babyl.dyndns.org>
Hi all,
A new version of Dancer 1 is on its way to CPAN (changelog is copied
below). This time around I've decided to do something wild: I'm first
releasing a trial version which, provided no issue is found in the
meantime, will be promoted to a bona fide general availability release
one week from now.
As usual, a big, big, BIG thanks to everybody who submitted patches,
opened bug reports and helped with the release in any way, shape, or
form. Y'all rock. :-)
Joy,
`/anick
1.3131_0 2014-10-11
[BUG FIXES]
- Test was failing under perl 5.8.9. (GH#1057, Tom Hukins)
- Don't get tripped by YAML::XS's readonly values. (GH#1070)
[DOCUMENTATION]
- Minor doc update to detail how to pass protocol information in Apache
(GH#1079, Andy Beverley)
- Add the Dancer policy POD.
[ENHANCEMENTS]
- Dancer::Template::TemplateToolkit now supports DATA-embedded templates.
(GH#1061, Jochen Lutz)
- New function 'param_array'. (GH#1055, Yanick Champoux)
- D::Serializer::YAML and Dancer::Config can now use 'YAML::XS'.
[MISC]
- Add 'YAML' as a recommended dependency. (GH#1080)
[STATISTICS]
- code churn: 14 files changed, 348 insertions(+), 30 deletions(-)
From andy at andybev.com Sun Oct 12 15:33:22 2014
From: andy at andybev.com (Andrew Beverley)
Date: Sun, 12 Oct 2014 15:33:22 +0100
Subject: [dancer-users] Incorrect attempts to serialize HTML
In-Reply-To:
References: <1412855256.17038.12.camel@andy-laptop>
Message-ID: <1413124402.21477.5.camel@andy-laptop>
On Thu, 2014-10-09 at 19:43 +0200, Sawyer X wrote:
> Not at all! That is an excellent question.
Great, thanks for the prompt reply.
> You can see that Dancer2::Core::Request checks for a supported content
> type. The line is:
>
>
> return unless
> $self->serializer->support_content_type($content_type);
>
> However, in Dancer2::Core::Response, it doesn't check for a supported
> content type in the request in order to serialize a response back.
> This would be the correct behavior since a serializer basically says
> "I would like to serialize my responses" and not "I would like to
> serialize my responses IF the request was made with a header". The
> reason it ignores any request header in the response is because it is,
> by definition, a *request* header. This means it only relates to the
> request, not the response.
Right, got it. Thanks. Basically, when I was receiving requests for JSON
from the browser, I was forwarding to a normal HTML page in the case of
an exception. This was causing the problems with the HTML being
serialized.
> If you would like to return HTML and serialized information, you have
> two options:
> 1. Separate the code that accepts and returns serialized data into two
> different Dancer2 apps.
> 2. Don't use a serializer, and call the to_json and from_json when
> *you* decide it's the right time for it.
What I've done is to detect whether the request is for serialized data,
and if it is then not to forward the HTML page in the case of an
exception.
One thing I did find is that request->content_type was empty when I
called it (in the controller after an exception). So instead, I used
if (request->serializer =~ /JSON/)
That seems a bit messy. Is there a better way?
Thanks again,
Andy
From yanick at babyl.dyndns.org Sun Oct 12 20:16:38 2014
From: yanick at babyl.dyndns.org (Yanick Champoux)
Date: Sun, 12 Oct 2014 15:16:38 -0400
Subject: [dancer-users] Dancer1 v1.3131_0 on its way to CPAN
In-Reply-To: <54398000.6000706@babyl.dyndns.org>
References: <54398000.6000706@babyl.dyndns.org>
Message-ID: <543AD396.6050702@babyl.dyndns.org>
On 14-10-11 03:07 PM, Yanick Champoux wrote:
> This time around I've decided to do something wild: I'm first releasing
> a trial version
... which turned out to be a prrrrrretty good idea. There's a test that
will fail if TemplateToolkit isn't installed. That will be rectified
today and a new trial version will be pushed presently.
Joy,
`/anick
From tushardave26 at gmail.com Mon Oct 13 14:45:12 2014
From: tushardave26 at gmail.com (Tushar Dave)
Date: Mon, 13 Oct 2014 09:45:12 -0400
Subject: [dancer-users] 504 Gateway Timeout Error while processing big data
files
Message-ID:
Hello,
I am working on my Dancer Project (using Perl 5.20.0, apache2, RHEL 6 and
Dancer) in which I am providing a web form to user. When user submits the
form with appropriate values, a Q-Q plot will be generated by R code on
backend. Once the plot is available on server I am sending user an email
with the link of generated plot.
My code works completely fine with smaller data file (e.g. 100KB ? 10 MB)
upload. But, if user uploads the large data files (e.g. > 30MB), the upload
works fine but processing of data and generating of plot will take more
time which caused 504 Gateway Time Out Error. I can use below options to
resolve this.
(1) Change Time Out time in apache configuration file
(2) Submit a job through batch queuing system such as SGE
(3) Use Proc::Simple or Proc::Background to run the process in background
and keep checking whether process is running in background or not.
I am using the 3rd option. What I am trying to do is I am using
Proc::Simple to run Perl-R-code (i.e. listed in below list as 2) in
background. Then I am using poll() method of Proc::Simple to check whether
the process is running or not. If the process is running, render a template
that shows user that process is still running. When process is finished,
render another template with generated Q-Q plot. Below are my codes:
(1) Dancer code under lib/ ---- http://pastebin.com/QGCFtq2X
(2) Perl + R code that generate Q-Q plot ----http://pastebin.com/U5hg45dQ
(3) qqPlot.tt ---- http://pastebin.com/u30XArVr
(4) processing.tt ---- http://pastebin.com/RSH1kptp
The problem I am facing right now that my Dancer code (i.e. listed as 1
above) execute while loop on line 77 of (1) but the template ?processing.tt?
is not coming up on browser. I don?t know what am I doing wrong?
Can someone help me to figure out my error? Or please suggest me any other
way to resolve Gateway Time Out Error.
Thanks for any help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From xsawyerx at gmail.com Tue Oct 14 03:49:05 2014
From: xsawyerx at gmail.com (Sawyer X)
Date: Tue, 14 Oct 2014 04:49:05 +0200
Subject: [dancer-users] Dancer2 0.152000 on its way to CPAN
Message-ID:
Hi everyone!
We've done quite a few big things in Dancer2 and I'd like to share them. I
haven't sent an email about 0.151000 - released last week - so I'm going to
share some information about it too.
These two versions provide a few important changes:
* Introducing our policy document.
* Dancer2 Apps (Dancer2::Core::App) now build proper PSGI applications - *each
on its own*. This allows you to create much better PSGI apps, which will
interact much better. This will also disallow things we do not recommend,
such as "pass" and "forward" between Dancer Apps. The original `psgi_app`
keyword (and Dancer2 method) still works, just as before, providing the old
behavior.
* We added a migration document, for those moving from Dancer to Dancer2,
thanks to Snigdha Dagar.
* There is a big "chat with us" banner on MetaCPAN.org, to help newbies
join the IRC channel.
* New 'content' keyword to set content in a declarative manner.
The first two are the biggest ones. I will email the list about both of
those separately.
I would like to congratulate and thank all those who worked on this
release: Andy Beverley, D?vid Kov?cs, DavsX, Paul
Cochrane, simbabque, Lindsey Beesley, Snigdha Dagar, Russell Jenkins, and
yours truly, Sawyer X.
Great work, everyone!
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From hugues at max4mail.com Tue Oct 14 10:02:00 2014
From: hugues at max4mail.com (Hugues)
Date: Tue, 14 Oct 2014 11:02:00 +0200
Subject: [dancer-users] 504 Gateway Timeout Error while processing big
data files
In-Reply-To:
References:
Message-ID: <543CE688.4000701@max4mail.com>
Hello Dave
for my point of view , the problem come from file
http://pastebin.com/QGCFtq2X
line 77 to 80
while ($process->poll()) {
template 'processing.tt';
sleep 10;
}
first time it's work, but after not , every 10 sec you send
processing.tt to your browser ( first time ,
browser ask 1 anwers, not more , and that all )
you need to use ajax
1) launch in background your process (and create PID to locate your
process, https://metacpan.org/pod/Unix::PID )
2) add javascript in your brower to update result ( see example below )
3) add route
ajax '/myProcesss' {
If ( $PID ) {
... in course
} else {
... process over
}
}
see fun example
http://advent.perldancer.org/2011/14
bye
Hugues
Le 13/10/2014 15:45, Tushar Dave a ?crit :
>
> Hello,
>
> I am working on my Dancer Project (using Perl 5.20.0, apache2, RHEL 6
> and Dancer) in which I am providing a web form to user. When user
> submits the form with appropriate values, a Q-Q plot will be generated
> by R code on backend. Once the plot is available on server I am
> sending user an email with the link of generated plot.
>
> My code works completely fine with smaller data file (e.g. 100KB ? 10
> MB) upload. But, if user uploads the large data files (e.g. > 30MB),
> the upload works fine but processing of data and generating of plot
> will take more time which caused 504 Gateway Time Out Error. I can use
> below options to resolve this.
>
> (1) Change Time Out time in apache configuration file
> (2) Submit a job through batch queuing system such as SGE
> (3) Use Proc::Simple or Proc::Background to run the process in
> background and keep checking whether process is running in background
> or not.
>
> I am using the 3rd option. What I am trying to do is I am using
> Proc::Simple to run Perl-R-code (i.e. listed in below list as 2) in
> background. Then I am using poll() method of Proc::Simple to check
> whether the process is running or not. If the process is running,
> render a template that shows user that process is still running. When
> process is finished, render another template with generated Q-Q plot.
> Below are my codes:
>
> (1) Dancer code under lib/ ---- http://pastebin.com/QGCFtq2X
>
> (2) Perl + R code that generate Q-Q plot ----http://pastebin.com/U5hg45dQ
> (3) qqPlot.tt ---- http://pastebin.com/u30XArVr
> (4) processing.tt ----
> http://pastebin.com/RSH1kptp
>
>
> The problem I am facing right now that my Dancer code (i.e. listed as
> 1 above) execute while loop on line 77 of (1) but the template
> ?processing.tt ? is not coming up on browser. I
> don?t know what am I doing wrong?
>
> Can someone help me to figure out my error? Or please suggest me any
> other way to resolve Gateway Time Out Error.
>
> Thanks for any help.
>
>
>
>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From tushardave26 at gmail.com Tue Oct 14 21:20:01 2014
From: tushardave26 at gmail.com (Tushar Dave)
Date: Tue, 14 Oct 2014 16:20:01 -0400
Subject: [dancer-users] 504 Gateway Timeout Error while processing big data
files
Message-ID:
Hello Hughes,
Thanks for your solution. Can you elaborate the process by using my code? I
am newbie in web development and never worked on AJAX. So I am having
little bit hard time to connect front-end and back-end pieces. I hope this
make sense. Thanks again for your help.
Best,
Tushar
On Tue, Oct 14, 2014 at 7:00 AM, wrote:
> Send dancer-users mailing list submissions to
> dancer-users at dancer.pm
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
> or, via email, send a message with subject or body 'help' to
> dancer-users-request at dancer.pm
>
> You can reach the person managing the list at
> dancer-users-owner at dancer.pm
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of dancer-users digest..."
>
>
> Today's Topics:
>
> 1. 504 Gateway Timeout Error while processing big data files
> (Tushar Dave)
> 2. Dancer2 0.152000 on its way to CPAN (Sawyer X)
> 3. Re: 504 Gateway Timeout Error while processing big data files
> (Hugues)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 13 Oct 2014 09:45:12 -0400
> From: Tushar Dave
> To: dancer-users at dancer.pm
> Subject: [dancer-users] 504 Gateway Timeout Error while processing big
> data files
> Message-ID:
> AV+-bPirEK_HtJKV6MzPSsicU+hHWES-ZWvDu30AQqg at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hello,
>
> I am working on my Dancer Project (using Perl 5.20.0, apache2, RHEL 6 and
> Dancer) in which I am providing a web form to user. When user submits the
> form with appropriate values, a Q-Q plot will be generated by R code on
> backend. Once the plot is available on server I am sending user an email
> with the link of generated plot.
>
> My code works completely fine with smaller data file (e.g. 100KB ? 10 MB)
> upload. But, if user uploads the large data files (e.g. > 30MB), the upload
> works fine but processing of data and generating of plot will take more
> time which caused 504 Gateway Time Out Error. I can use below options to
> resolve this.
>
> (1) Change Time Out time in apache configuration file
> (2) Submit a job through batch queuing system such as SGE
> (3) Use Proc::Simple or Proc::Background to run the process in background
> and keep checking whether process is running in background or not.
>
> I am using the 3rd option. What I am trying to do is I am using
> Proc::Simple to run Perl-R-code (i.e. listed in below list as 2) in
> background. Then I am using poll() method of Proc::Simple to check whether
> the process is running or not. If the process is running, render a template
> that shows user that process is still running. When process is finished,
> render another template with generated Q-Q plot. Below are my codes:
>
> (1) Dancer code under lib/ ---- http://pastebin.com/QGCFtq2X
> <
> http://l.facebook.com/l.php?u=http%3A%2F%2Fpastebin.com%2FQGCFtq2X&h=rAQEet8kg&enc=AZPs41qoqJIPTpi-4sL7ICzxgTszmdLN8joWBwLuzcrfK9vRcRfNFMBkMwQ469-n_nstqwOwtAbH-nmvLQ2wpy562EF9ef2zhBcdAmH-VMVJ0hxvwzRz0I7PTKh3UXO8cLkyOO0FHwL87zQbk5K3hOlh&s=1
> >
> (2) Perl + R code that generate Q-Q plot ----http://pastebin.com/U5hg45dQ
> (3) qqPlot.tt ---- http://pastebin.com/u30XArVr
> (4) processing.tt ---- http://pastebin.com/RSH1kptp
> <
> http://l.facebook.com/l.php?u=http%3A%2F%2Fpastebin.com%2FRSH1kptp&h=RAQE1lHBj&enc=AZNQgweLY1hC15HguQHmiCGzFR4PmjOnNATBVnN1R6YQAB5GTbq8HVyUgPioxTRgWi5Ixb2d4HXAkvB9XC8336gnmRWA-ARYheUbQ0LrUZRyaQI_lpMVDD_D9ZL-F-79X6a4ZlLInL6O6QOknwU9RBpX&s=1
> >
>
> The problem I am facing right now that my Dancer code (i.e. listed as 1
> above) execute while loop on line 77 of (1) but the template ?
> processing.tt?
> is not coming up on browser. I don?t know what am I doing wrong?
>
> Can someone help me to figure out my error? Or please suggest me any other
> way to resolve Gateway Time Out Error.
>
> Thanks for any help.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20141013/f89da308/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 2
> Date: Tue, 14 Oct 2014 04:49:05 +0200
> From: Sawyer X
> To: Perl Dancer users mailing list
> Subject: [dancer-users] Dancer2 0.152000 on its way to CPAN
> Message-ID:
> zTiOcxe-w at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi everyone!
>
> We've done quite a few big things in Dancer2 and I'd like to share them. I
> haven't sent an email about 0.151000 - released last week - so I'm going to
> share some information about it too.
>
> These two versions provide a few important changes:
> * Introducing our policy document.
> * Dancer2 Apps (Dancer2::Core::App) now build proper PSGI applications -
> *each
> on its own*. This allows you to create much better PSGI apps, which will
> interact much better. This will also disallow things we do not recommend,
> such as "pass" and "forward" between Dancer Apps. The original `psgi_app`
> keyword (and Dancer2 method) still works, just as before, providing the old
> behavior.
> * We added a migration document, for those moving from Dancer to Dancer2,
> thanks to Snigdha Dagar.
> * There is a big "chat with us" banner on MetaCPAN.org, to help newbies
> join the IRC channel.
> * New 'content' keyword to set content in a declarative manner.
>
> The first two are the biggest ones. I will email the list about both of
> those separately.
>
> I would like to congratulate and thank all those who worked on this
> release: Andy Beverley, D?vid Kov?cs, DavsX, Paul
> Cochrane, simbabque, Lindsey Beesley, Snigdha Dagar, Russell Jenkins, and
> yours truly, Sawyer X.
>
> Great work, everyone!
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20141014/a7fae5c9/attachment-0001.html
> >
>
> ------------------------------
>
> Message: 3
> Date: Tue, 14 Oct 2014 11:02:00 +0200
> From: Hugues
> To: dancer-users at dancer.pm
> Subject: Re: [dancer-users] 504 Gateway Timeout Error while processing
> big data files
> Message-ID: <543CE688.4000701 at max4mail.com>
> Content-Type: text/plain; charset="windows-1252"; Format="flowed"
>
> Hello Dave
> for my point of view , the problem come from file
> http://pastebin.com/QGCFtq2X
> <
> http://l.facebook.com/l.php?u=http%3A%2F%2Fpastebin.com%2FQGCFtq2X&h=rAQEet8kg&enc=AZPs41qoqJIPTpi-4sL7ICzxgTszmdLN8joWBwLuzcrfK9vRcRfNFMBkMwQ469-n_nstqwOwtAbH-nmvLQ2wpy562EF9ef2zhBcdAmH-VMVJ0hxvwzRz0I7PTKh3UXO8cLkyOO0FHwL87zQbk5K3hOlh&s=1
> >
> line 77 to 80
>
> while ($process->poll()) {
> template 'processing.tt';
> sleep 10;
> }
> first time it's work, but after not , every 10 sec you send
> processing.tt to your browser ( first time ,
> browser ask 1 anwers, not more , and that all )
>
> you need to use ajax
> 1) launch in background your process (and create PID to locate your
> process, https://metacpan.org/pod/Unix::PID )
>
> 2) add javascript in your brower to update result ( see example below )
>
> 3) add route
>
> ajax '/myProcesss' {
>
> If ( $PID ) {
> ... in course
> } else {
> ... process over
> }
>
> }
>
>
>
> see fun example
> http://advent.perldancer.org/2011/14
>
> bye
> Hugues
>
>
>
> Le 13/10/2014 15:45, Tushar Dave a ?crit :
> >
> > Hello,
> >
> > I am working on my Dancer Project (using Perl 5.20.0, apache2, RHEL 6
> > and Dancer) in which I am providing a web form to user. When user
> > submits the form with appropriate values, a Q-Q plot will be generated
> > by R code on backend. Once the plot is available on server I am
> > sending user an email with the link of generated plot.
> >
> > My code works completely fine with smaller data file (e.g. 100KB ? 10
> > MB) upload. But, if user uploads the large data files (e.g. > 30MB),
> > the upload works fine but processing of data and generating of plot
> > will take more time which caused 504 Gateway Time Out Error. I can use
> > below options to resolve this.
> >
> > (1) Change Time Out time in apache configuration file
> > (2) Submit a job through batch queuing system such as SGE
> > (3) Use Proc::Simple or Proc::Background to run the process in
> > background and keep checking whether process is running in background
> > or not.
> >
> > I am using the 3rd option. What I am trying to do is I am using
> > Proc::Simple to run Perl-R-code (i.e. listed in below list as 2) in
> > background. Then I am using poll() method of Proc::Simple to check
> > whether the process is running or not. If the process is running,
> > render a template that shows user that process is still running. When
> > process is finished, render another template with generated Q-Q plot.
> > Below are my codes:
> >
> > (1) Dancer code under lib/ ---- http://pastebin.com/QGCFtq2X
> > <
> http://l.facebook.com/l.php?u=http%3A%2F%2Fpastebin.com%2FQGCFtq2X&h=rAQEet8kg&enc=AZPs41qoqJIPTpi-4sL7ICzxgTszmdLN8joWBwLuzcrfK9vRcRfNFMBkMwQ469-n_nstqwOwtAbH-nmvLQ2wpy562EF9ef2zhBcdAmH-VMVJ0hxvwzRz0I7PTKh3UXO8cLkyOO0FHwL87zQbk5K3hOlh&s=1
> >
> > (2) Perl + R code that generate Q-Q plot ----
> http://pastebin.com/U5hg45dQ
> > (3) qqPlot.tt ---- http://pastebin.com/u30XArVr
> > (4) processing.tt ----
> > http://pastebin.com/RSH1kptp
> > <
> http://l.facebook.com/l.php?u=http%3A%2F%2Fpastebin.com%2FRSH1kptp&h=RAQE1lHBj&enc=AZNQgweLY1hC15HguQHmiCGzFR4PmjOnNATBVnN1R6YQAB5GTbq8HVyUgPioxTRgWi5Ixb2d4HXAkvB9XC8336gnmRWA-ARYheUbQ0LrUZRyaQI_lpMVDD_D9ZL-F-79X6a4ZlLInL6O6QOknwU9RBpX&s=1
> >
> >
> > The problem I am facing right now that my Dancer code (i.e. listed as
> > 1 above) execute while loop on line 77 of (1) but the template
> > ?processing.tt ? is not coming up on browser. I
> > don?t know what am I doing wrong?
> >
> > Can someone help me to figure out my error? Or please suggest me any
> > other way to resolve Gateway Time Out Error.
> >
> > Thanks for any help.
> >
> >
> >
> >
> >
> > _______________________________________________
> > dancer-users mailing list
> > dancer-users at dancer.pm
> > http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20141014/fc54d1f3/attachment-0001.html
> >
>
> ------------------------------
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
> End of dancer-users Digest, Vol 56, Issue 12
> ********************************************
>
--
Tushar Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jm130794 at gmail.com Wed Oct 15 13:42:45 2014
From: jm130794 at gmail.com (Jean-Marc Choulet)
Date: Wed, 15 Oct 2014 14:42:45 +0200
Subject: [dancer-users] send_file and Dancer2
Message-ID: <543E6BC5.5020203@gmail.com>
Hello,
I 'am new to Dancer2 and I tried to migrate some code from mod_perl to
Dancer2. Somewhere, I have this mod_perl code :
sub handler {
...
open my $fh, "<$filename" or die $@;
binmode $fh;
$req->content_type('application/vnd.oasis.opendocument.spreadsheet');
$req->headers_out->{'Content-Disposition'} = "attachment; filename=$file";
my ($n, $data);
while ($n = read($fh, $data, 1024)) {
$req->print($data);
}
close($fh);
return Apache2::Const::OK;
}
The mod_perl code send a OpenOffice document to the client.
How can I do the same thing with Dancer2 ?
Thanks,
Jean-Marc
From jack.lareau at gmail.com Wed Oct 15 14:41:33 2014
From: jack.lareau at gmail.com (Jacques Lareau)
Date: Wed, 15 Oct 2014 09:41:33 -0400
Subject: [dancer-users] send_file and Dancer2
In-Reply-To: <543E6BC5.5020203@gmail.com>
References: <543E6BC5.5020203@gmail.com>
Message-ID:
Hi Jean-Marc,
Here is how I do it:
return send_file(
"/system/path/to/file.xlsx",
content_type => 'application/vnd.oasis.opendocument.spreadsheet',
filename => 'excel_file.xlsx',
system_path => 1
);
If I need more control I use File::Slurp read_file function:
header 'Content-Disposition' => "inline; filename=$filename";
content_type "application/vnd.oasis.opendocument.spreadsheet";
return read_file( "/system/path/to/file.xlsx", binmode => ':raw' );
On Wed, Oct 15, 2014 at 8:42 AM, Jean-Marc Choulet
wrote:
> Hello,
>
> I 'am new to Dancer2 and I tried to migrate some code from mod_perl to
> Dancer2. Somewhere, I have this mod_perl code :
>
> sub handler {
> ...
>
> open my $fh, "<$filename" or die $@;
> binmode $fh;
>
> $req->content_type('application/vnd.oasis.opendocument.spreadsheet');
> $req->headers_out->{'Content-Disposition'} = "attachment;
> filename=$file";
>
> my ($n, $data);
> while ($n = read($fh, $data, 1024)) {
> $req->print($data);
> }
>
> close($fh);
>
> return Apache2::Const::OK;
> }
>
> The mod_perl code send a OpenOffice document to the client.
>
> How can I do the same thing with Dancer2 ?
>
> Thanks,
>
> Jean-Marc
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From john at stoffel.org Wed Oct 15 21:29:59 2014
From: john at stoffel.org (John Stoffel)
Date: Wed, 15 Oct 2014 16:29:59 -0400
Subject: [dancer-users] Example of pagination with DBIC?
Message-ID: <21566.55623.243157.688501@quad.stoffel.home>
Hi all,
My google-fu is weak and I haven't been able to find a good example of
how to do pagination with Dancer, DBIC and ideally some basic
Javascript to make it look good.
Here's my basic code that I'm working with right now, which I know is
semi busted, but I just keep hitting roadblocks. The goal here is to
let me spin up quick, but nice search forms for read only mysql DBs
for a library I work with in my spare time. Ideally a CRUD interface
down the line to allow end users to add/edit records. DBIC looks to
be the way to go with this down the line, since it can do proper
records and transactions. At least I think it can.
Any way, my code:
package TestDBIC;
use Dancer ':syntax';
use Dancer::Plugin::DBIC qw(schema resultset rset);
# cd TestDBIC;
# TestDBIC::Schema 'dbi:mysql:dbname=emina;host=quad' emina
our $VERSION = '0.1';
get '/' => sub {
template 'search';
};
post '/results' => sub {
my $name = param 'Name';
my $sex = param 'Sex';
my $city = param 'City';
my $state = param 'State';
my $id = param 'MummyID';
my @rows;
my $query;
my $q = {};
my $limit = 10;
my $opts = {};
$opts->{order_by} = { -desc => 'id' };
$opts->{rows} = $limit if defined $limit;
# We need to join in several tables from the schema
$opts->{page} = 1;
$opts->{limit} = 15;
$opts->{order_by} = { 'desc' => 'name'};
my $rs = schema->resultset('MummyInNorthAmerica');
if ($name) {
if ($query) { $query .= " AND "; }
$query .= "Name LIKE $name";
$q->{name} = { like => "%$name%" } ;
}
if ($sex) {
if ($query) { $query .= " AND "; }
$query .= "Sex = $sex";
$q->{sex} = $sex;
}
@rows = $rs->search($q,$opts)->pager;
template 'results',
{ query => $query,
mummies => \@rows,
rows => 1000
};
};
true;
From john at stoffel.org Wed Oct 15 21:49:05 2014
From: john at stoffel.org (John Stoffel)
Date: Wed, 15 Oct 2014 16:49:05 -0400
Subject: [dancer-users] Example of pagination with DBIC?
In-Reply-To: <21566.55623.243157.688501@quad.stoffel.home>
References: <21566.55623.243157.688501@quad.stoffel.home>
Message-ID: <21566.56769.326404.104632@quad.stoffel.home>
And just to let people know, I've looked at:
http://advent.perldancer.org/2012/20
http://www.slideshare.net/davorg/database-programming-with-perl-and-dbixclass
http://www.slideshare.net/ranguard/dbixclass-beginners-presentation
http://www.perlmonks.org/?node=557402
http://search.cpan.org/~ribasushi/DBIx-Class-0.082801/lib/DBIx/Class/ResultSet.pm#pager
http://www.dagolden.com/index.php/1807/my-second-week-of-dancer-now-with-queues-and-transactional-email/
and I'm just not getting all the details quite yet. Though it's
probably me and not just quite able to bring it all together.
Thanks,
John
From garu at cpan.org Wed Oct 15 22:14:52 2014
From: garu at cpan.org (breno)
Date: Wed, 15 Oct 2014 18:14:52 -0300
Subject: [dancer-users] Example of pagination with DBIC?
In-Reply-To: <21566.55623.243157.688501@quad.stoffel.home>
References: <21566.55623.243157.688501@quad.stoffel.home>
Message-ID:
Hey John!
First of all, if you're doing a website search, I would recommend against
"like" on a database - it gets really slow really fast. Instead you should
try something made for full text search like Elasticsearch.
Going back to your question: in terms of paging with Dancer and
Dancer::Plugin::DBIC, this is what you could do:
----------------8<-----------------
get '/search' => sub {
# what the user is searching: (e.g.: /search?q=whatever)
my $query = param('q');
# which page to render (e.g.: /search?q=whatever&page=2)
my $page = param('page');
# make sure it's a valid page:
$page = 1 unless $page && $page =~ /^\d+$/;
# create your search parameters (I'm gonna handwave this one)
my %search_params = ( ... );
# fetch the proper page on the database
my @results = rset('MyRS')->search(
\%search_params,
{
rows => 10, # <=== how many items per page
}
)->page( $page )->all;
template 'mytemplatename', { search_results => \@results };
};
---------------->8-----------------
Does this help you at all? I would also read through
https://metacpan.org/pod/distribution/DBIx-Class/lib/DBIx/Class/Manual/QuickStart.pod
and
https://metacpan.org/pod/distribution/DBIx-Class/lib/DBIx/Class/Manual/Intro.pod
.
And of course, if you have any other questions, feel free to ask :)
Cheers!
garu
On Wed, Oct 15, 2014 at 5:29 PM, John Stoffel wrote:
>
> Hi all,
>
> My google-fu is weak and I haven't been able to find a good example of
> how to do pagination with Dancer, DBIC and ideally some basic
> Javascript to make it look good.
>
> Here's my basic code that I'm working with right now, which I know is
> semi busted, but I just keep hitting roadblocks. The goal here is to
> let me spin up quick, but nice search forms for read only mysql DBs
> for a library I work with in my spare time. Ideally a CRUD interface
> down the line to allow end users to add/edit records. DBIC looks to
> be the way to go with this down the line, since it can do proper
> records and transactions. At least I think it can.
>
> Any way, my code:
>
> package TestDBIC;
> use Dancer ':syntax';
> use Dancer::Plugin::DBIC qw(schema resultset rset);
>
> # cd TestDBIC;
> # TestDBIC::Schema 'dbi:mysql:dbname=emina;host=quad' emina
>
> our $VERSION = '0.1';
>
> get '/' => sub {
> template 'search';
> };
>
> post '/results' => sub {
> my $name = param 'Name';
> my $sex = param 'Sex';
> my $city = param 'City';
> my $state = param 'State';
> my $id = param 'MummyID';
>
> my @rows;
> my $query;
> my $q = {};
>
> my $limit = 10;
> my $opts = {};
> $opts->{order_by} = { -desc => 'id' };
> $opts->{rows} = $limit if defined $limit;
> # We need to join in several tables from the schema
> $opts->{page} = 1;
> $opts->{limit} = 15;
> $opts->{order_by} = { 'desc' => 'name'};
>
> my $rs = schema->resultset('MummyInNorthAmerica');
>
> if ($name) {
> if ($query) { $query .= " AND "; }
> $query .= "Name LIKE $name";
> $q->{name} = { like => "%$name%" } ;
> }
>
> if ($sex) {
> if ($query) { $query .= " AND "; }
> $query .= "Sex = $sex";
> $q->{sex} = $sex;
> }
>
> @rows = $rs->search($q,$opts)->pager;
>
> template 'results',
> { query => $query,
> mummies => \@rows,
> rows => 1000
> };
> };
>
> true;
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jack.lareau at gmail.com Wed Oct 15 22:25:05 2014
From: jack.lareau at gmail.com (Jacques Lareau)
Date: Wed, 15 Oct 2014 17:25:05 -0400
Subject: [dancer-users] Example of pagination with DBIC?
In-Reply-To:
References: <21566.55623.243157.688501@quad.stoffel.home>
Message-ID:
Here is how I do it. Check the gist for better formatting.
https://gist.github.com/jacqueslareau/1e9dcc04d416e1216161
status_ok is because it's an API. You can use the value returned in a
template instead.
------------------------
get '/' => sub {
my $rows = params->{rows} // 10;
my $page = params->{page} // 1;
my $keyword = params->{keyword};
my $sort_direction = 'desc';
my $sort_by = 'id';
# make sure to validate parameters
# build your where from your parameters
my %where;
$where{description} = { -like => "%$keyword%" } if defined $keyword;
my $things = rset('Project')->search(\%where, {
page => $page,
rows => $rows,
order_by => { '-desc' . $sort_direction => $sort_by },
});
my @results;
while ( my $thing = $things->next ) {
push @results, {
id => $thing->id,
description => $thing->description
};
}
status_ok({
results => \@results,
pagination => {
total => $projects->pager->total_entries,
rows => $rows,
page => $page
}
});
}
On Wed, Oct 15, 2014 at 5:14 PM, breno wrote:
> Hey John!
>
> First of all, if you're doing a website search, I would recommend against
> "like" on a database - it gets really slow really fast. Instead you should
> try something made for full text search like Elasticsearch.
>
> Going back to your question: in terms of paging with Dancer and
> Dancer::Plugin::DBIC, this is what you could do:
>
> ----------------8<-----------------
> get '/search' => sub {
> # what the user is searching: (e.g.: /search?q=whatever)
> my $query = param('q');
>
> # which page to render (e.g.: /search?q=whatever&page=2)
> my $page = param('page');
>
> # make sure it's a valid page:
> $page = 1 unless $page && $page =~ /^\d+$/;
>
> # create your search parameters (I'm gonna handwave this one)
> my %search_params = ( ... );
>
> # fetch the proper page on the database
> my @results = rset('MyRS')->search(
> \%search_params,
> {
> rows => 10, # <=== how many items per page
> }
> )->page( $page )->all;
>
> template 'mytemplatename', { search_results => \@results };
> };
> ---------------->8-----------------
>
> Does this help you at all? I would also read through
> https://metacpan.org/pod/distribution/DBIx-Class/lib/DBIx/Class/Manual/QuickStart.pod
> and
> https://metacpan.org/pod/distribution/DBIx-Class/lib/DBIx/Class/Manual/Intro.pod
> .
>
> And of course, if you have any other questions, feel free to ask :)
>
> Cheers!
>
> garu
>
>
>
> On Wed, Oct 15, 2014 at 5:29 PM, John Stoffel wrote:
>
>>
>> Hi all,
>>
>> My google-fu is weak and I haven't been able to find a good example of
>> how to do pagination with Dancer, DBIC and ideally some basic
>> Javascript to make it look good.
>>
>> Here's my basic code that I'm working with right now, which I know is
>> semi busted, but I just keep hitting roadblocks. The goal here is to
>> let me spin up quick, but nice search forms for read only mysql DBs
>> for a library I work with in my spare time. Ideally a CRUD interface
>> down the line to allow end users to add/edit records. DBIC looks to
>> be the way to go with this down the line, since it can do proper
>> records and transactions. At least I think it can.
>>
>> Any way, my code:
>>
>> package TestDBIC;
>> use Dancer ':syntax';
>> use Dancer::Plugin::DBIC qw(schema resultset rset);
>>
>> # cd TestDBIC;
>> # TestDBIC::Schema 'dbi:mysql:dbname=emina;host=quad' emina
>>
>> our $VERSION = '0.1';
>>
>> get '/' => sub {
>> template 'search';
>> };
>>
>> post '/results' => sub {
>> my $name = param 'Name';
>> my $sex = param 'Sex';
>> my $city = param 'City';
>> my $state = param 'State';
>> my $id = param 'MummyID';
>>
>> my @rows;
>> my $query;
>> my $q = {};
>>
>> my $limit = 10;
>> my $opts = {};
>> $opts->{order_by} = { -desc => 'id' };
>> $opts->{rows} = $limit if defined $limit;
>> # We need to join in several tables from the schema
>> $opts->{page} = 1;
>> $opts->{limit} = 15;
>> $opts->{order_by} = { 'desc' => 'name'};
>>
>> my $rs = schema->resultset('MummyInNorthAmerica');
>>
>> if ($name) {
>> if ($query) { $query .= " AND "; }
>> $query .= "Name LIKE $name";
>> $q->{name} = { like => "%$name%" } ;
>> }
>>
>> if ($sex) {
>> if ($query) { $query .= " AND "; }
>> $query .= "Sex = $sex";
>> $q->{sex} = $sex;
>> }
>>
>> @rows = $rs->search($q,$opts)->pager;
>>
>> template 'results',
>> { query => $query,
>> mummies => \@rows,
>> rows => 1000
>> };
>> };
>>
>> true;
>> _______________________________________________
>> dancer-users mailing list
>> dancer-users at dancer.pm
>> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>>
>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jack.lareau at gmail.com Wed Oct 15 22:29:44 2014
From: jack.lareau at gmail.com (Jacques Lareau)
Date: Wed, 15 Oct 2014 17:29:44 -0400
Subject: [dancer-users] Example of pagination with DBIC?
In-Reply-To:
References: <21566.55623.243157.688501@quad.stoffel.home>
Message-ID:
Please check the gist, there's errors in my reply.
On Wed, Oct 15, 2014 at 5:25 PM, Jacques Lareau
wrote:
> Here is how I do it. Check the gist for better formatting.
>
> https://gist.github.com/jacqueslareau/1e9dcc04d416e1216161
>
> status_ok is because it's an API. You can use the value returned in a
> template instead.
>
> ------------------------
>
> get '/' => sub {
>
> my $rows = params->{rows} // 10;
> my $page = params->{page} // 1;
> my $keyword = params->{keyword};
> my $sort_direction = 'desc';
> my $sort_by = 'id';
>
> # make sure to validate parameters
>
> # build your where from your parameters
> my %where;
> $where{description} = { -like => "%$keyword%" } if defined $keyword;
>
> my $things = rset('Project')->search(\%where, {
> page => $page,
> rows => $rows,
> order_by => { '-desc' . $sort_direction => $sort_by },
> });
>
> my @results;
> while ( my $thing = $things->next ) {
> push @results, {
> id => $thing->id,
> description => $thing->description
> };
> }
>
> status_ok({
> results => \@results,
> pagination => {
> total => $projects->pager->total_entries,
> rows => $rows,
> page => $page
> }
> });
>
> }
>
>
> On Wed, Oct 15, 2014 at 5:14 PM, breno wrote:
>
>> Hey John!
>>
>> First of all, if you're doing a website search, I would recommend against
>> "like" on a database - it gets really slow really fast. Instead you should
>> try something made for full text search like Elasticsearch.
>>
>> Going back to your question: in terms of paging with Dancer and
>> Dancer::Plugin::DBIC, this is what you could do:
>>
>> ----------------8<-----------------
>> get '/search' => sub {
>> # what the user is searching: (e.g.: /search?q=whatever)
>> my $query = param('q');
>>
>> # which page to render (e.g.: /search?q=whatever&page=2)
>> my $page = param('page');
>>
>> # make sure it's a valid page:
>> $page = 1 unless $page && $page =~ /^\d+$/;
>>
>> # create your search parameters (I'm gonna handwave this one)
>> my %search_params = ( ... );
>>
>> # fetch the proper page on the database
>> my @results = rset('MyRS')->search(
>> \%search_params,
>> {
>> rows => 10, # <=== how many items per page
>> }
>> )->page( $page )->all;
>>
>> template 'mytemplatename', { search_results => \@results };
>> };
>> ---------------->8-----------------
>>
>> Does this help you at all? I would also read through
>> https://metacpan.org/pod/distribution/DBIx-Class/lib/DBIx/Class/Manual/QuickStart.pod
>> and
>> https://metacpan.org/pod/distribution/DBIx-Class/lib/DBIx/Class/Manual/Intro.pod
>> .
>>
>> And of course, if you have any other questions, feel free to ask :)
>>
>> Cheers!
>>
>> garu
>>
>>
>>
>> On Wed, Oct 15, 2014 at 5:29 PM, John Stoffel wrote:
>>
>>>
>>> Hi all,
>>>
>>> My google-fu is weak and I haven't been able to find a good example of
>>> how to do pagination with Dancer, DBIC and ideally some basic
>>> Javascript to make it look good.
>>>
>>> Here's my basic code that I'm working with right now, which I know is
>>> semi busted, but I just keep hitting roadblocks. The goal here is to
>>> let me spin up quick, but nice search forms for read only mysql DBs
>>> for a library I work with in my spare time. Ideally a CRUD interface
>>> down the line to allow end users to add/edit records. DBIC looks to
>>> be the way to go with this down the line, since it can do proper
>>> records and transactions. At least I think it can.
>>>
>>> Any way, my code:
>>>
>>> package TestDBIC;
>>> use Dancer ':syntax';
>>> use Dancer::Plugin::DBIC qw(schema resultset rset);
>>>
>>> # cd TestDBIC;
>>> # TestDBIC::Schema 'dbi:mysql:dbname=emina;host=quad' emina
>>>
>>> our $VERSION = '0.1';
>>>
>>> get '/' => sub {
>>> template 'search';
>>> };
>>>
>>> post '/results' => sub {
>>> my $name = param 'Name';
>>> my $sex = param 'Sex';
>>> my $city = param 'City';
>>> my $state = param 'State';
>>> my $id = param 'MummyID';
>>>
>>> my @rows;
>>> my $query;
>>> my $q = {};
>>>
>>> my $limit = 10;
>>> my $opts = {};
>>> $opts->{order_by} = { -desc => 'id' };
>>> $opts->{rows} = $limit if defined $limit;
>>> # We need to join in several tables from the schema
>>> $opts->{page} = 1;
>>> $opts->{limit} = 15;
>>> $opts->{order_by} = { 'desc' => 'name'};
>>>
>>> my $rs = schema->resultset('MummyInNorthAmerica');
>>>
>>> if ($name) {
>>> if ($query) { $query .= " AND "; }
>>> $query .= "Name LIKE $name";
>>> $q->{name} = { like => "%$name%" } ;
>>> }
>>>
>>> if ($sex) {
>>> if ($query) { $query .= " AND "; }
>>> $query .= "Sex = $sex";
>>> $q->{sex} = $sex;
>>> }
>>>
>>> @rows = $rs->search($q,$opts)->pager;
>>>
>>> template 'results',
>>> { query => $query,
>>> mummies => \@rows,
>>> rows => 1000
>>> };
>>> };
>>>
>>> true;
>>> _______________________________________________
>>> dancer-users mailing list
>>> dancer-users at dancer.pm
>>> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>>>
>>
>>
>> _______________________________________________
>> dancer-users mailing list
>> dancer-users at dancer.pm
>> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From xsawyerx at gmail.com Thu Oct 16 01:26:06 2014
From: xsawyerx at gmail.com (Sawyer X)
Date: Thu, 16 Oct 2014 02:26:06 +0200
Subject: [dancer-users] Dancer2::Manual::Migration
Message-ID:
Hi all,
as I mentioned in the release email, Dancer2 now has a migration document
for users coming from Dancer, Dancer2::Manual::Migration
[1].
This is a living document describing the few differences between Dancer and
Dancer2, and is meant to help you convert your applications and adjust your
way of doing things to fit Dancer2.
You can help! If you see something wrong, if you think something could be
described better, if you wish to add anything that is missing, please let
us know. Either send a pull request, a Github issue, an RT ticket, or just
shoot us an email - to the list or to one of the core devs personally.
Whatever you prefer.
The migration document has been assembled and written by an OPW (Outreach
Program for Women) applicant, Snigdha Dagar. I want to thank her for her
work (which is not done yet!) and to all those who reported and helped
collect all the various issues that are mentioned in the migration document.
Good job!
Dance away,
Sawyer.
[1]
https://metacpan.org/pod/distribution/Dancer2/lib/Dancer2/Manual/Migration.pod
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From xsawyerx at gmail.com Thu Oct 16 01:40:42 2014
From: xsawyerx at gmail.com (Sawyer X)
Date: Thu, 16 Oct 2014 02:40:42 +0200
Subject: [dancer-users] Standards of Conduct
Message-ID:
As part of the latest Dancer2 release, and part of the upcoming Dancer
release, we have added our policy document, which currently indicates our
Standards of Conduct.
The Standards of Conduct are the standards by which we behave with each
other in the community. These are the standards by which we hold each other
accountable.
We promote the Dancer community as a safe space for everyone. We promote
self-awareness, consideration, and self-regulation.
We are very strict with our policy and will make sure to enforce it in
every realm in which the community comes together. This includes the
mailing list, our IRC channel, and Dancer conferences.
Please let us know if any issue comes up. We're always here.
I'm including the entire text here, in its current released version as of
this date, but you can find it at Dancer::Policy
and Dancer2::Policy
.
Sawyer,
The Dancer Core Devs.
STANDARDS OF CONDUCT
These standards applies anywhere the community comes together as a
group. This includes, but is not limited to, the Dancer IRC channel, the
Dancer mailing list, Dancer hackathons, and Dancer conferences.
* Always be civil.
* Heed the moderators.
* Abuse is not tolerated.
Civility is simple: stick to the facts while avoiding demeaning remarks
and sarcasm. It is not enough to be factual. You must also be civil.
Responding in kind to incivility is not acceptable.
If the list moderators tell you that you are not being civil, carefully
consider how your words have appeared before responding in any way. You
may protest, but repeated protest in the face of a repeatedly reaffirmed
decision is not acceptable.
Unacceptable behavior will result in a public and clearly identified
warning. Repeated unacceptable behavior will result in removal from the
mailing list and revocation of any commit bit. The first removal is for
one month. Subsequent removals will double in length. After six months
with no warning, a user's ban length is reset. Removals, like warnings,
are public.
The list of moderators consists of all active core developers. This
includes, in alphabetical order, Alberto Sim?es, David Precious, Mickey
Nasriachi, Russell Jenkins, Sawyer X, Stefan Hornburg (Racke), Steven
Humphrey, and Yanick Champoux.
This list might additionally grow to active members of the community who
have stepped up to help handle abusive behavior. If this should happen,
this document would be updated to include their names.
Additionally, it's important to understand the self-regulating nature we
foster at the Dancer community. This means anyone and everyone in the
community - in the channel, on the list, at an event - has the ability
to call out unacceptable behavior and incivility to others in the
community.
Moderators are responsibe for issuing warnings and take disciplenary
actions, but anyone may - and is encouraged - to publicly make note of
unacceptable treatment of others.
As a core principle, abuse is never tolerated. One cannot berate,
insult, debase, deride, put-down, or vilify anyone, or act towards
anyone in a way intending to hurt them.
The community specifically considers as abuse any attempts to otherize
anyone, whether by their technical skill, knowledge, gender, sexual
orientation, or any other characteristic.
The community aims to maintain a safe space for everyone, in any forum
it has. If you ever feel this core principle has been compromised, you
are strongly urged to contact a moderator. We are always here.
Remember, this is your community, as much as it is anyone else's.
CREDITS
This policy has been adopted and adapted from the policy available for
the Perl language development, provided by p5p (the Perl 5 Porters).
The original inspiration policy document can be read at perlpolicy.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From garu at cpan.org Thu Oct 16 16:22:56 2014
From: garu at cpan.org (breno)
Date: Thu, 16 Oct 2014 12:22:56 -0300
Subject: [dancer-users] Dancer2::Manual::Migration
In-Reply-To:
References:
Message-ID:
Great job, Snigdha! Keep it up! \o/
On Wed, Oct 15, 2014 at 9:26 PM, Sawyer X wrote:
> Hi all,
>
> as I mentioned in the release email, Dancer2 now has a migration document
> for users coming from Dancer, Dancer2::Manual::Migration
>
> [1].
>
> This is a living document describing the few differences between Dancer
> and Dancer2, and is meant to help you convert your applications and adjust
> your way of doing things to fit Dancer2.
>
> You can help! If you see something wrong, if you think something could be
> described better, if you wish to add anything that is missing, please let
> us know. Either send a pull request, a Github issue, an RT ticket, or just
> shoot us an email - to the list or to one of the core devs personally.
> Whatever you prefer.
>
> The migration document has been assembled and written by an OPW (Outreach
> Program for Women) applicant, Snigdha Dagar. I want to thank her for her
> work (which is not done yet!) and to all those who reported and helped
> collect all the various issues that are mentioned in the migration document.
>
> Good job!
>
> Dance away,
> Sawyer.
>
> [1]
> https://metacpan.org/pod/distribution/Dancer2/lib/Dancer2/Manual/Migration.pod
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From davserer at gmail.com Thu Oct 16 20:05:05 2014
From: davserer at gmail.com (=?UTF-8?B?S292w6FjcyBEw6F2aWQgWyBEYXZzIF0=?=)
Date: Thu, 16 Oct 2014 21:05:05 +0200
Subject: [dancer-users] Dancer2::Manual::Migration
In-Reply-To:
References:
Message-ID:
+1 nice
On Thu, Oct 16, 2014 at 5:22 PM, breno wrote:
> Great job, Snigdha! Keep it up! \o/
>
> On Wed, Oct 15, 2014 at 9:26 PM, Sawyer X wrote:
>
>> Hi all,
>>
>> as I mentioned in the release email, Dancer2 now has a migration document
>> for users coming from Dancer, Dancer2::Manual::Migration
>>
>> [1].
>>
>> This is a living document describing the few differences between Dancer
>> and Dancer2, and is meant to help you convert your applications and adjust
>> your way of doing things to fit Dancer2.
>>
>> You can help! If you see something wrong, if you think something could be
>> described better, if you wish to add anything that is missing, please let
>> us know. Either send a pull request, a Github issue, an RT ticket, or just
>> shoot us an email - to the list or to one of the core devs personally.
>> Whatever you prefer.
>>
>> The migration document has been assembled and written by an OPW (Outreach
>> Program for Women) applicant, Snigdha Dagar. I want to thank her for her
>> work (which is not done yet!) and to all those who reported and helped
>> collect all the various issues that are mentioned in the migration document.
>>
>> Good job!
>>
>> Dance away,
>> Sawyer.
>>
>> [1]
>> https://metacpan.org/pod/distribution/Dancer2/lib/Dancer2/Manual/Migration.pod
>>
>> _______________________________________________
>> dancer-users mailing list
>> dancer-users at dancer.pm
>> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>>
>>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From john at stoffel.org Thu Oct 16 20:20:35 2014
From: john at stoffel.org (John Stoffel)
Date: Thu, 16 Oct 2014 15:20:35 -0400
Subject: [dancer-users] Example of pagination with DBIC?
In-Reply-To:
References: <21566.55623.243157.688501@quad.stoffel.home>
Message-ID: <21568.6787.949330.438272@quad.stoffel.home>
breno> First of all, if you're doing a website search, I would
breno> recommend against "like" on a database - it gets really slow
breno> really fast. Instead you should try something made for full
breno> text search like Elasticsearch.
Sure, I know it's probably slow but it's a small database (under 1000
entries, though closer to 3000 owners listed. Again, not huge. I do
appreciate the pointer and I'll probably play with it down the line.
breno> Going back to your question: in terms of paging with Dancer and
breno> Dancer::Plugin::DBIC, this is what you could do:
Thanks for this, I'm going to have to look at this more closely. The
only issue I see is that the 'get' might get *really* hairy, since the
users can search on multiple fields at a time (though I doubt in
practice this happens... but you never know!).
After reading up more on DBIx::Class stuff, I really need to go back
into the DB and cleanup the schema and the naming. It's really
horrible and crufty. But again, that's for another day.
Just to give people a hint of what I'm doing, here's my search.tt
template:
# TestDBIC/views/search.tt
Search for Mummies
and of course my results.tt as well.
<% IF query.length %>
Search query was : <% query %>
<% IF mummies.size %>
Found <% mummies.size (num) %> Records:
<% FOREACH mummy IN mummies %>
Name:
<% mummy.name %>
MummyID = <% mummy.mummyid %>
Sex: <% mummy.sex %>
<% mummy.Notes %>
<% END %>
<% ELSE %>
No Mummies found for your search.
<% END %>
<% ELSE %>
Search query was empty...
<% END %>
">Search
All of this is just quick throw together hacks for now, until I get
the basics working. As you can see, I was following the instructions
that included using the bootstrap or twitter CSS style stuff. Which
of course isn't setup properly. Heh.
Thanks!
John
breno> ----------------8<-----------------
breno> get '/search' => sub {
breno> ???? # what the user is searching: (e.g.: /search?q=whatever)
breno> ??? my $query = param('q');
breno> ??? # which page to render (e.g.: /search?q=whatever&page=2)
breno> ??? my $page? = param('page');
breno> ??? # make sure it's a valid page:
breno> ??? $page = 1 unless $page && $page =~ /^\d+$/;
breno> ??? # create your search parameters (I'm gonna handwave this one)
breno> ??? my %search_params = ( ... );
breno> ??? # fetch the proper page on the database
breno> ? ? my @results = rset('MyRS')->search(
breno> ?????????? \%search_params,
breno> ?????????? {
breno> ??????????????? rows => 10,?? # <=== how many items per page
breno> ?????????? }
breno> ???? )->page( $page )->all;
breno> ???? template 'mytemplatename', { search_results => \@results };
breno> };
----------------> 8-----------------
breno> Does this help you at all? I would also read through https://metacpan.org/pod/distribution/
breno> DBIx-Class/lib/DBIx/Class/Manual/QuickStart.pod and https://metacpan.org/pod/distribution/
breno> DBIx-Class/lib/DBIx/Class/Manual/Intro.pod.
breno> And of course, if you have any other questions, feel free to ask :)
breno> Cheers!
breno> garu
breno> On Wed, Oct 15, 2014 at 5:29 PM, John Stoffel wrote:
breno> Hi all,
breno> My google-fu is weak and I haven't been able to find a good example of
breno> how to do pagination with Dancer, DBIC and ideally some basic
breno> Javascript to make it look good.
breno> Here's my basic code that I'm working with right now, which I know is
breno> semi busted, but I just keep hitting roadblocks.? The goal here is to
breno> let me spin up quick, but nice search forms for read only mysql DBs
breno> for a library I work with in my spare time.? Ideally a CRUD interface
breno> down the line to allow end users to add/edit records.? DBIC looks to
breno> be the way to go with this down the line, since it can do proper
breno> records and transactions.? At least I think it can.
breno> Any way, my code:
breno> ? package TestDBIC;
breno> ? use Dancer ':syntax';
breno> ? use Dancer::Plugin::DBIC qw(schema resultset rset);
breno> ? # cd TestDBIC;
breno> ? # TestDBIC::Schema 'dbi:mysql:dbname=emina;host=quad' emina
breno> ? our $VERSION = '0.1';
breno> ? get '/' => sub {
breno> ? ? ? template 'search';
breno> ? };
breno> ? post '/results' => sub {
breno> ? ? my $name = param 'Name';
breno> ? ? my $sex = param 'Sex';
breno> ? ? my $city = param 'City';
breno> ? ? my $state = param 'State';
breno> ? ? my $id = param 'MummyID';
breno> ? ? my @rows;
breno> ? ? my $query;
breno> ? ? my $q = {};
breno> ? ? my $limit = 10;
breno> ? ? my $opts = {};
breno> ? ? $opts->{order_by} = { -desc => 'id' };
breno> ? ? $opts->{rows} = $limit if defined $limit;
breno> ? ? # We need to join in several tables from the schema
breno> ? ? $opts->{page} = 1;
breno> ? ? $opts->{limit} = 15;
breno> ? ? $opts->{order_by} = { 'desc' => 'name'};
breno> ? ? my $rs = schema->resultset('MummyInNorthAmerica');
breno> ? ? if ($name) {
breno> ? ? ? if ($query) { $query .= " AND "; }
breno> ? ? ? $query .= "Name LIKE $name";
breno> ? ? ? $q->{name} = { like => "%$name%" } ;
breno> ? ? }
breno> ? ? if ($sex) {
breno> ? ? ? if ($query) { $query .= " AND "; }
breno> ? ? ? $query .= "Sex = $sex";
breno> ? ? ? $q->{sex} = $sex;
breno> ? ? }
breno> ? ? @rows = $rs->search($q,$opts)->pager;
breno> ? ? template 'results',
breno> ? ? ? { query => $query,
breno> ? ? ? ? mummies => \@rows,
breno> ? ? ? ? rows => 1000
breno> ? ? ? };
breno> ? };
breno> ? true;
breno> _______________________________________________
breno> dancer-users mailing list
breno> dancer-users at dancer.pm
breno> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
breno> _______________________________________________
breno> dancer-users mailing list
breno> dancer-users at dancer.pm
breno> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
From john at stoffel.org Thu Oct 16 20:23:00 2014
From: john at stoffel.org (John Stoffel)
Date: Thu, 16 Oct 2014 15:23:00 -0400
Subject: [dancer-users] Example of pagination with DBIC?
In-Reply-To:
References: <21566.55623.243157.688501@quad.stoffel.home>
Message-ID: <21568.6932.656222.899640@quad.stoffel.home>
Jacques> Here is how I do it. Check the gist for better formatting.
Jacques> https://gist.github.com/jacqueslareau/1e9dcc04d416e1216161
Jacques> status_ok is because it's an API. You can use the value returned in a template instead.
Thanks a ton for this pointer, I'll look into it more deeply.
Now for a stupid question, has everyone moved away from using 'post'
to instead using 'get' as the method of choice for form handling in
general? I'm still stuck in the old PHP days honestly, but trying to
move upto newer stuff. Tried Rails years ago, but all the examples of
building a blog weren't what I needed/wanted. Sigh... I don't know
why everyone things a blog is a good example.
Anyway... sorry for whining. I'll take a look at your code and see
how I can make it work for me.
John
From jack.lareau at gmail.com Thu Oct 16 21:13:44 2014
From: jack.lareau at gmail.com (Jacques Lareau)
Date: Thu, 16 Oct 2014 16:13:44 -0400
Subject: [dancer-users] Example of pagination with DBIC?
In-Reply-To: <21568.6932.656222.899640@quad.stoffel.home>
References: <21566.55623.243157.688501@quad.stoffel.home>
<21568.6932.656222.899640@quad.stoffel.home>
Message-ID:
No. It's just more RESTful. I mainly build API with Dancer, so I tend to
follow a RESTful design.
http://en.wikipedia.org/wiki/Representational_state_transfer
GET is used to list/query a collection and also retreive an object
POST is used to create an object into a collection.
PUT to update an object
DELETE to delete an object
Since you are quering a collection, I'd suggest using GET.
On Thu, Oct 16, 2014 at 3:23 PM, John Stoffel wrote:
>
> Jacques> Here is how I do it. Check the gist for better formatting.
> Jacques> https://gist.github.com/jacqueslareau/1e9dcc04d416e1216161
>
> Jacques> status_ok is because it's an API. You can use the value returned
> in a template instead.
>
> Thanks a ton for this pointer, I'll look into it more deeply.
>
> Now for a stupid question, has everyone moved away from using 'post'
> to instead using 'get' as the method of choice for form handling in
> general? I'm still stuck in the old PHP days honestly, but trying to
> move upto newer stuff. Tried Rails years ago, but all the examples of
> building a blog weren't what I needed/wanted. Sigh... I don't know
> why everyone things a blog is a good example.
>
> Anyway... sorry for whining. I'll take a look at your code and see
> how I can make it work for me.
>
> John
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From john at stoffel.org Thu Oct 16 21:55:00 2014
From: john at stoffel.org (John Stoffel)
Date: Thu, 16 Oct 2014 16:55:00 -0400
Subject: [dancer-users] Example of pagination with DBIC?
In-Reply-To:
References: <21566.55623.243157.688501@quad.stoffel.home>
<21568.6932.656222.899640@quad.stoffel.home>
Message-ID: <21568.12452.803947.975441@quad.stoffel.home>
Jacques> No. It's just more RESTful. I mainly build API with Dancer,
Jacques> so I tend to follow a RESTful design.
I'm familiar with RESTful ideas, just haven't made it work for me yet,
but I'm not a programmer by trade and this is my side hobby at
points. So I really do appreciate all your help here.
Jacques> GET is used to list/query a collection and also retreive an object
Jacques> POST is used to create an object into a collection.
Jacques> PUT to update an object
Jacques> DELETE to delete an object
Yup, makes sense.
Jacques> Since you are quering a collection, I'd suggest using GET.
Ok, so how would you save the query parameters so that each time you
page through the results, they get submitted cleanly? I'm looking at
various simple pagination libs now to take the next step here. And
looking at the 'bootstrap' framework to make it look pretty.
I've got bigger problems down the line, since I will need to replace a
big date library and calendar generation library written in PHP if I
want to move forward for one existing DB I offer searches for. But
that's not hear nor there. Let me get the basics working better
first.
From jack.lareau at gmail.com Thu Oct 16 22:06:16 2014
From: jack.lareau at gmail.com (Jacques Lareau)
Date: Thu, 16 Oct 2014 17:06:16 -0400
Subject: [dancer-users] Example of pagination with DBIC?
In-Reply-To: <21568.12452.803947.975441@quad.stoffel.home>
References: <21566.55623.243157.688501@quad.stoffel.home>
<21568.6932.656222.899640@quad.stoffel.home>
<21568.12452.803947.975441@quad.stoffel.home>
Message-ID:
Since a GET will put parameters into the URL, you can just re-use the URL
and change the page parameter.
/?name=test&city=montreal&page=1 <- to change pages
On Thu, Oct 16, 2014 at 4:55 PM, John Stoffel wrote:
>
> Jacques> No. It's just more RESTful. I mainly build API with Dancer,
> Jacques> so I tend to follow a RESTful design.
>
> I'm familiar with RESTful ideas, just haven't made it work for me yet,
> but I'm not a programmer by trade and this is my side hobby at
> points. So I really do appreciate all your help here.
>
> Jacques> GET is used to list/query a collection and also retreive an object
> Jacques> POST is used to create an object into a collection.
> Jacques> PUT to update an object
> Jacques> DELETE to delete an object
>
> Yup, makes sense.
>
> Jacques> Since you are quering a collection, I'd suggest using GET.
>
> Ok, so how would you save the query parameters so that each time you
> page through the results, they get submitted cleanly? I'm looking at
> various simple pagination libs now to take the next step here. And
> looking at the 'bootstrap' framework to make it look pretty.
>
> I've got bigger problems down the line, since I will need to replace a
> big date library and calendar generation library written in PHP if I
> want to move forward for one existing DB I offer searches for. But
> that's not hear nor there. Let me get the basics working better
> first.
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From hugues at max4mail.com Fri Oct 17 04:18:37 2014
From: hugues at max4mail.com (Hugues)
Date: Fri, 17 Oct 2014 05:18:37 +0200
Subject: [dancer-users] Dancer2::Manual::Migration
In-Reply-To:
References:
Message-ID: <54408A8D.5050709@max4mail.com>
+1 good job
Hugues.
Le 16/10/2014 21:05, Kov?cs D?vid [ Davs ] a ?crit :
> +1 nice
>
> On Thu, Oct 16, 2014 at 5:22 PM, breno > wrote:
>
> Great job, Snigdha! Keep it up! \o/
>
> On Wed, Oct 15, 2014 at 9:26 PM, Sawyer X > wrote:
>
> Hi all,
>
> as I mentioned in the release email, Dancer2 now has a
> migration document for users coming from Dancer,
> Dancer2::Manual::Migration
> [1].
>
> This is a living document describing the few differences
> between Dancer and Dancer2, and is meant to help you convert
> your applications and adjust your way of doing things to fit
> Dancer2.
>
> You can help! If you see something wrong, if you think
> something could be described better, if you wish to add
> anything that is missing, please let us know. Either send a
> pull request, a Github issue, an RT ticket, or just shoot us
> an email - to the list or to one of the core devs personally.
> Whatever you prefer.
>
> The migration document has been assembled and written by an
> OPW (Outreach Program for Women) applicant, Snigdha Dagar. I
> want to thank her for her work (which is not done yet!) and to
> all those who reported and helped collect all the various
> issues that are mentioned in the migration document.
>
> Good job!
>
> Dance away,
> Sawyer.
>
> [1]
> https://metacpan.org/pod/distribution/Dancer2/lib/Dancer2/Manual/Migration.pod
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From snigdha.dagar at gmail.com Mon Oct 20 12:40:16 2014
From: snigdha.dagar at gmail.com (Snigdha Dagar)
Date: Mon, 20 Oct 2014 17:10:16 +0530
Subject: [dancer-users] Dancer2::Manual::Migration
In-Reply-To: <54408A8D.5050709@max4mail.com>
References:
<54408A8D.5050709@max4mail.com>
Message-ID:
Hi all,
Thank you :). I couldn't have done it without sawyer's guidance though.
Hope I can continue contributing to the project!
Regards,
Snigdha.
On Fri, Oct 17, 2014 at 8:48 AM, Hugues wrote:
> +1 good job
> Hugues.
> Le 16/10/2014 21:05, Kov?cs D?vid [ Davs ] a ?crit :
>
> +1 nice
>
> On Thu, Oct 16, 2014 at 5:22 PM, breno wrote:
>
>> Great job, Snigdha! Keep it up! \o/
>>
>> On Wed, Oct 15, 2014 at 9:26 PM, Sawyer X wrote:
>>
>>> Hi all,
>>>
>>> as I mentioned in the release email, Dancer2 now has a migration
>>> document for users coming from Dancer, Dancer2::Manual::Migration
>>>
>>> [1].
>>>
>>> This is a living document describing the few differences between
>>> Dancer and Dancer2, and is meant to help you convert your applications and
>>> adjust your way of doing things to fit Dancer2.
>>>
>>> You can help! If you see something wrong, if you think something could
>>> be described better, if you wish to add anything that is missing, please
>>> let us know. Either send a pull request, a Github issue, an RT ticket, or
>>> just shoot us an email - to the list or to one of the core devs personally.
>>> Whatever you prefer.
>>>
>>> The migration document has been assembled and written by an OPW
>>> (Outreach Program for Women) applicant, Snigdha Dagar. I want to thank her
>>> for her work (which is not done yet!) and to all those who reported and
>>> helped collect all the various issues that are mentioned in the migration
>>> document.
>>>
>>> Good job!
>>>
>>> Dance away,
>>> Sawyer.
>>>
>>> [1]
>>> https://metacpan.org/pod/distribution/Dancer2/lib/Dancer2/Manual/Migration.pod
>>>
>>> _______________________________________________
>>> dancer-users mailing list
>>> dancer-users at dancer.pm
>>> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>>>
>>>
>>
>> _______________________________________________
>> dancer-users mailing list
>> dancer-users at dancer.pm
>> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>>
>>
>
>
> _______________________________________________
> dancer-users mailing listdancer-users at dancer.pmhttp://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
--
Snigdha Dagar
Electronics and Communication Engineering
IIIT Hyderabad
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From dancer at failmail.de Tue Oct 21 19:34:13 2014
From: dancer at failmail.de (burnersk)
Date: Tue, 21 Oct 2014 20:34:13 +0200
Subject: [dancer-users] Dancer2 Release Cycles and Feature/Bugfix Release
Planning
Message-ID:
Hi Sawyer,
here is my draft of the introduction email...
--- DRAFT ---
Hi folks.
I was wondering recently when the feature X or the bug Y will be fixed.
So I try to look up it in the GitHub Milestones[1]. I saw that
milestones was used but starting from 0.14100 there was no progress at
all with milestones (progress with issues itself was made of course).
For me as a developer milestones are nice because I can see what is on
the schedule for the next release. From the user point I can see when my
beloved feature X or hated bug Y is going to be fixed.
I think GitHub Milestones are a great way to communicate to developers
and users at the same time.
So I asked on #dancer if there where any plans to proceed with release
planning based on GitHub Milestones.
It turns out that the intention was there but time was missing to
organize.
Sawyer asked me to attend to help with release planning.
I'm not sure that this is true but I had in mind, that the Dancer2
release cycle supposed to be 2 weeks. So that every second week there
will be a new release with new great features and fixed bugs.
I'd like to check with all of you folks, developers or users, if you
want this or not. Please discuss this idea.
I can imagine the following "process".
Basic environment:
* develop period: 12 days (freeze on day 13 and 14, release on day 14)
* develop time per developer: 1 hour / day (5 days a week, 10 hours a
period)
* developers: 8 core developer (some may not work "all the time" but we
have other contributors)
* total work hours per period: 80 hours
Milestone calculation (break on first match, it's just a guideline - not
a strict rule):
* estimate severity and popularity
* very_next_release means the very next release even if it's barely
possible (no left *planed* development time)
* next_possible_release means the next possible release according on the
development time left for the milestone
* next_but_one_possible_release means the possible release(ses) after
next_possible_release according on the development time left for the
milestone
1. for severity in (Blocker, Critical) set milestone to
very_next_release
2. for type in (Bug) and severity in (Major) and popularity in (High)
set milestone to very_next_release
3. for severity in (Medium) and popularity in (High) and complexity in
(Easy) set milestone to next_possible_release
4. for severity in (Medium) and popularity in (High) and complexity in
(Moderate) set milestone to next_possible_release
5. for severity in (Medium) and popularity in (High) and complexity in
(Hard) set milestone to next_but_one_possible_release
6. for others set milestone to next_but_one_possible_release
I'd soft estimate the severity and popularity, check back with the core
developers and finally assign the milestone. Furthermore I'll (or a
small team will) set severity, popularity and complexity initially when
they are checked by the core team.
According to the release cycle the milestone due dates will be set.
Issues which are not become final within the desired milestone will be
moved to the next milestone. Due to this circumstance there will be
reserve of 10 working hours within every milestone for those delayed
issues. The affected issues will be flagged as delayed.
What do you think about all of it?
[1] https://github.com/PerlDancer/Dancer2/milestones
--
Cheers,
burnersk
From dancer at failmail.de Tue Oct 21 19:36:41 2014
From: dancer at failmail.de (burnersk)
Date: Tue, 21 Oct 2014 20:36:41 +0200
Subject: [dancer-users] Dancer2 Release Cycles and Feature/Bugfix
Release Planning
In-Reply-To:
References:
Message-ID:
It's actual the final mail and not the draft to sawyer... :D
Sorry about that
--
Cheers,
burnersk
Am 2014-10-21 20:34, schrieb burnersk:
> Hi Sawyer,
>
> here is my draft of the introduction email...
>
> --- DRAFT ---
>
> Hi folks.
>
> I was wondering recently when the feature X or the bug Y will be
> fixed. So I try to look up it in the GitHub Milestones[1]. I saw that
> milestones was used but starting from 0.14100 there was no progress at
> all with milestones (progress with issues itself was made of course).
>
> For me as a developer milestones are nice because I can see what is on
> the schedule for the next release. From the user point I can see when
> my beloved feature X or hated bug Y is going to be fixed.
>
> I think GitHub Milestones are a great way to communicate to developers
> and users at the same time.
>
> So I asked on #dancer if there where any plans to proceed with release
> planning based on GitHub Milestones.
>
> It turns out that the intention was there but time was missing to
> organize.
>
> Sawyer asked me to attend to help with release planning.
>
> I'm not sure that this is true but I had in mind, that the Dancer2
> release cycle supposed to be 2 weeks. So that every second week there
> will be a new release with new great features and fixed bugs.
>
> I'd like to check with all of you folks, developers or users, if you
> want this or not. Please discuss this idea.
>
> I can imagine the following "process".
>
> Basic environment:
> * develop period: 12 days (freeze on day 13 and 14, release on day 14)
> * develop time per developer: 1 hour / day (5 days a week, 10 hours a
> period)
> * developers: 8 core developer (some may not work "all the time" but
> we have other contributors)
> * total work hours per period: 80 hours
>
> Milestone calculation (break on first match, it's just a guideline -
> not a strict rule):
> * estimate severity and popularity
> * very_next_release means the very next release even if it's barely
> possible (no left *planed* development time)
> * next_possible_release means the next possible release according on
> the development time left for the milestone
> * next_but_one_possible_release means the possible release(ses) after
> next_possible_release according on the development time left for the
> milestone
> 1. for severity in (Blocker, Critical) set milestone to
> very_next_release
> 2. for type in (Bug) and severity in (Major) and popularity in (High)
> set milestone to very_next_release
> 3. for severity in (Medium) and popularity in (High) and complexity in
> (Easy) set milestone to next_possible_release
> 4. for severity in (Medium) and popularity in (High) and complexity in
> (Moderate) set milestone to next_possible_release
> 5. for severity in (Medium) and popularity in (High) and complexity in
> (Hard) set milestone to next_but_one_possible_release
> 6. for others set milestone to next_but_one_possible_release
>
> I'd soft estimate the severity and popularity, check back with the
> core developers and finally assign the milestone. Furthermore I'll (or
> a small team will) set severity, popularity and complexity initially
> when they are checked by the core team.
>
> According to the release cycle the milestone due dates will be set.
>
> Issues which are not become final within the desired milestone will be
> moved to the next milestone. Due to this circumstance there will be
> reserve of 10 working hours within every milestone for those delayed
> issues. The affected issues will be flagged as delayed.
>
>
> What do you think about all of it?
>
>
> [1] https://github.com/PerlDancer/Dancer2/milestones
From xsawyerx at gmail.com Tue Oct 21 20:27:33 2014
From: xsawyerx at gmail.com (Sawyer X)
Date: Tue, 21 Oct 2014 21:27:33 +0200
Subject: [dancer-users] Dancer2 Release Cycles and Feature/Bugfix
Release Planning
In-Reply-To:
References:
Message-ID:
On Tue, Oct 21, 2014 at 8:34 PM, burnersk wrote:
>
> Hi folks.
>
> I was wondering recently when the feature X or the bug Y will be fixed. So
> I try to look up it in the GitHub Milestones[1]. I saw that milestones was
> used but starting from 0.14100 there was no progress at all with milestones
> (progress with issues itself was made of course).
>
Alberto was the unofficial milestone manager. When he became busy, we had
to let that go, because none of us were as stubborn as he was to make sure
it happens and works. :)
>
> For me as a developer milestones are nice because I can see what is on the
> schedule for the next release. From the user point I can see when my
> beloved feature X or hated bug Y is going to be fixed.
>
> I think GitHub Milestones are a great way to communicate to developers and
> users at the same time.
>
Agreed.
>
> So I asked on #dancer if there where any plans to proceed with release
> planning based on GitHub Milestones.
>
> It turns out that the intention was there but time was missing to organize.
>
And a person stubborn and rude enough to say "you're going to be working on
this for the next release because it is urgent for people" but also
welcoming enough to feedback saying "it's not that urgent, but this is
actually more urgent" or "this will take us longer to achieve".
Alberto did that very well. :)
>
I'm not sure that this is true but I had in mind, that the Dancer2 release
> cycle supposed to be 2 weeks. So that every second week there will be a new
> release with new great features and fixed bugs.
>
Yup!
If there are urgent bug fixes, there is no particular reason not to make an
urgent release.
>
> I'd like to check with all of you folks, developers or users, if you want
> this or not. Please discuss this idea.
>
> I can imagine the following "process".
>
> [...]
>
That sounds really serious. It's one hell of a job you did there!
Great initiative. You have my blessing. :)
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From john at stoffel.org Wed Oct 22 15:12:21 2014
From: john at stoffel.org (John Stoffel)
Date: Wed, 22 Oct 2014 10:12:21 -0400
Subject: [dancer-users] Example of pagination with DBIC?
In-Reply-To:
References: <21566.55623.243157.688501@quad.stoffel.home>
<21568.6932.656222.899640@quad.stoffel.home>
<21568.12452.803947.975441@quad.stoffel.home>
Message-ID: <21575.47941.299478.357086@quad.stoffel.home>
Jacques> Since a GET will put parameters into the URL, you can just
Jacques> re-use the URL and change the page parameter.
Jacques> /?name=test&city=montreal&page=1 <- to change pages
So, I've been slowly hacking away at this and I think I have it mostly
working, but the question I have now is what is the best way to
build/modify the URL to support paging?
For example, I use the following URL
http://localhost:3000/?Name=&Sex=F&submit=Search
when I do my simple query. My base page is 1 if I have multiple
results. And after a bit of reading, I figure I can just use the
request->request_uri helper to get when I need and strip out more
stuff. Something like this, assuming I have more than 10 (default)
results to show, etc:
my $page_prev = $page - 1;
my $page_next = $page + 1;
my $rec_start = (($page-1) * $limit) + 1;
my $rec_end = ($page * $limit) - 1;
my $page_prev_uri = "";
my $page_next_uri = "";
if ($page_prev > 1) {
my $uri = request->request_uri;
$uri =~ s/\&page=\d+//;
$page_prev_uri = join("",$uri, '&page=' . $page-1);
}
if ($page_next < POSIX::ceil($count / $limit)) {
my $uri = request->request_uri;
$uri =~ s/\&page=\d+//;
$page_next_uri = join("",$uri,'&page=',$page+1);
}
All this is just basic math and works fine. The trick seems to be in
the URI re-writing, which *almost* works. So my search form just has:
And the URI when submitted looks like:
/?Name=&Sex=F&submit=Search
So my questions are:
1. Should I strip off the "&submit=Search" part when I build my prev and next links?
2. Should I pre-place a
field in my search form, with the obvious updating if I'm searching
on a different page?
3. Right now I'm using a single template to both show the search form
and the results. I'm thinking I really want to split this
up... and of course I want to allow the users to "refine" a search
so I need to pass back defaults for the various forms. Time to
learn how Dancer does sessions... :-)
Thanks,
John
From xsawyerx at gmail.com Thu Oct 23 22:53:44 2014
From: xsawyerx at gmail.com (Sawyer X)
Date: Thu, 23 Oct 2014 23:53:44 +0200
Subject: [dancer-users] Dancer2 0.153000 on its way to CPAN
Message-ID:
Hey everyone!
Another Dancer2 release is upon us. Dancer2 version 0.153000 is uploading
as we speak.
The changelog is as follows:
[ ENHANCEMENT ]
* Internal: Move the implementation of send_file from DSL to App.
(Russell Jenkins)
[ BUG FIXES ]
* GH #634, #687: Fix file logger defaults.
(Russell Jenkins, D?vid Kov?cs, Sawyer X)
* GH #730: Make App use app-level config for behind_proxy. (Sawyer X)
* GH #727: Disable regex metachars when calculating app location in
tests
(Gregor Herrmann)
* GH #681, #682, #712: Clear session engine within destroy_session.
(DavX, Russell Jenkins)
* Ignore :tests in importing, don't suggest :script. (Sawyer X)
[ DOCUMENTATION ]
* GH #728: Typos in Policy document. (Olaf Alders, Sawyer X)
I want to thank everyone who was involved in this release (in no particular
order): Russell Jenkins, D?vid Kov?cs, Gregor Herrmann, DavX, Olaf Alders,
and Sawyer X.
Enjoy!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: