[Dancer-users] Added options for Dancer::GetOpt

damien krotkine dkrotkine at gmail.com
Fri Jun 1 11:06:14 CEST 2012


Or maybe the more standard -- ?

perl bin/rtb_deamon.pl --environment production --verbose=1 -- --verbose=0

Dancer using the parameters before the --, and passing the rest along


On 1 June 2012 10:56, Ovid <curtis_ovid_poe at yahoo.com> wrote:
> That is an annoyingly good point. I'll have to think about this.
>
> Cheers,
> Curtis
> --
> Live and work overseas - http://www.overseas-exile.com/
> Buy the book - http://www.oreilly.com/catalog/perlhks/
> Tech blog - http://blogs.perl.org/users/ovid/
> Twitter - http://twitter.com/OvidPerl/
>
> ________________________________
> From: Daniel Perrett <dperrett at cambridge.org>
> To: Ovid <curtis_ovid_poe at yahoo.com>
> Cc: Perl Dancer <dancer-users at perldancer.org>;
> dancer-users-bounces at perldancer.org
> Sent: Wednesday, 30 May 2012, 18:20
> Subject: Re: [Dancer-users] Added options for Dancer::GetOpt
>
> Wouldn't this run the risk of users adding their own options and thus
> breaking their options if/when Dancer adds its own? Perhaps safest to add an
> option "--custom=s%" or somesuch:
>
> perl bin/rtb_deamon.pl --environment production --custom verbose=1 --custom
> force=1 --custom once=1
>
> Daniel
>
>
>
> From:        Ovid <curtis_ovid_poe at yahoo.com>
> To:        Perl Dancer <dancer-users at perldancer.org>
> Date:        30/05/2012 11:10
> Subject:        [Dancer-users] Added options for Dancer::GetOpt
> Sent by:        dancer-users-bounces at perldancer.org
> ________________________________
>
>
>
> Hi all,
>
> I've recently discovered a problem where I wrote a small daemon to handle a
> few tasks for my Dancer application. Unfortunately, I need more options
> beyond the option port, deamon, environment, help, confdir and restart
> arguments.
>
> I've temporary hacked together an solution that let's me do this:
>
>     perl bin/rtb_deamon.pl --verbose --force --once \
>       --environment production
>
> But it might be nice if someone thought of a *clean* way of allowing extra
> arguments beyond those hard-coded into Dancer::GetOpt. I can't think of that
> clean way right now :)
>
> Cheers,
> Ovid
> --
> Live and work overseas - http://www.overseas-exile.com/
> Buy the book - http://www.oreilly.com/catalog/perlhks/
> Tech blog - http://blogs.perl.org/users/ovid/
> Twitter -
> http://twitter.com/OvidPerl/_______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>
>
>
>
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>


More information about the Dancer-users mailing list