Mailing List Archive

Res: Catalyst tutorial
also in the catalyst tutorial
there are tow problems one is that
is sugest the use of .conf (apache like)
instead of the yaml.

If you follow the tutorial it don't metion
that both CREATE and edit has to have a line
like this
sub formfu_create :Local :FormConfig('books/formfu_create.conf') {

ok, that being said i cound not run it..

the page to have updates :
http://search.cpan.org/~zarquon/Catalyst-Manual-5.7013/lib/Catalyst/Manual/Tutorial/AdvancedCRUD/FormFu.pod#Config::General_Config_for_this_tutorial

the error i got:

Caught exception in MyApp::Controller::Books->formfu_create "Error parsing /home/daniel/code/catalyst/MyApp/root/forms/books/formfu_create.conf: Config::General: Cannot create hashref from <constraints> because there is
already a scalar option 'constraints' with value 'SingleValue'
at /usr/local/share/perl/5.10.0/Config/Any/General.pm line 51
at /usr/local/share/perl/5.10.0/HTML/FormFu/ObjectUtil.pm line 428"



Novos endereços, o Yahoo! que você conhece. Crie um email novo com a sua cara @ymail.com ou @rocketmail.com.
http://br.new.mail.yahoo.com/addresses
Re: Catalyst tutorial [ In reply to ]
If I may suggest,
We easily re-create The Tutorial on the Catalyst's Wiki !
We can even create as many as we want.

You can start here
http://dev.catalystframework.org/wiki/TheTutorial.edit if you want

Ali M.

On Tue, Aug 26, 2008 at 8:26 PM, Daniel Nicoletti
<dantti85-perl@yahoo.com.br> wrote:
> also in the catalyst tutorial
> there are tow problems one is that
> is sugest the use of .conf (apache like)
> instead of the yaml.
>
> If you follow the tutorial it don't metion
> that both CREATE and edit has to have a line
> like this
> sub formfu_create :Local :FormConfig('books/formfu_create.conf') {
>
> ok, that being said i cound not run it..
>
> the page to have updates :
> http://search.cpan.org/~zarquon/Catalyst-Manual-5.7013/lib/Catalyst/Manual/Tutorial/AdvancedCRUD/FormFu.pod#Config::General_Config_for_this_tutorial
>
> the error i got:
>
> Caught exception in MyApp::Controller::Books->formfu_create "Error parsing
> /home/daniel/code/catalyst/MyApp/root/forms/books/formfu_create.conf:
> Config::General: Cannot create hashref from <constraints> because there is
> already a scalar option 'constraints' with value 'SingleValue'
> at /usr/local/share/perl/5.10.0/Config/Any/General.pm line 51
> at /usr/local/share/perl/5.10.0/HTML/FormFu/ObjectUtil.pm line 428"
>
> ________________________________
> Novos endereços, o Yahoo! que você conhece. Crie um email novo com a sua
> cara @ymail.com ou @rocketmail.com.
> _______________________________________________
> Catalyst-dev mailing list
> Catalyst-dev@lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
>
>

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
Res: Catalyst tutorial [ In reply to ]
sorry but that addres gives me a:
"Sorry bubba, you aint got no rights to this page."

:P

Thanks



----- Mensagem original ----
De: Ali M. <tclwarrior@gmail.com>
Para: Development of the elegant MVC web framework <catalyst-dev@lists.scsys.co.uk>
Enviadas: Quinta-feira, 28 de Agosto de 2008 4:27:50
Assunto: Re: [Catalyst-dev] Catalyst tutorial

If I may suggest,
We easily re-create The Tutorial on the Catalyst's Wiki !
We can even create as many as we want.

You can start here
http://dev.catalystframework.org/wiki/TheTutorial.edit if you want

Ali M.

On Tue, Aug 26, 2008 at 8:26 PM, Daniel Nicoletti
<dantti85-perl@yahoo.com.br> wrote:
> also in the catalyst tutorial
> there are tow problems one is that
> is sugest the use of .conf (apache like)
> instead of the yaml.
>
> If you follow the tutorial it don't metion
> that both CREATE and edit has to have a line
> like this
> sub formfu_create :Local :FormConfig('books/formfu_create.conf') {
>
> ok, that being said i cound not run it..
>
> the page to have updates :
> http://search.cpan.org/~zarquon/Catalyst-Manual-5.7013/lib/Catalyst/Manual/Tutorial/AdvancedCRUD/FormFu.pod#Config::General_Config_for_this_tutorial
>
> the error i got:
>
> Caught exception in MyApp::Controller::Books->formfu_create "Error parsing
> /home/daniel/code/catalyst/MyApp/root/forms/books/formfu_create.conf:
> Config::General: Cannot create hashref from <constraints> because there is
> already a scalar option 'constraints' with value 'SingleValue'
> at /usr/local/share/perl/5.10.0/Config/Any/General.pm line 51
> at /usr/local/share/perl/5.10.0/HTML/FormFu/ObjectUtil.pm line 428"
>
> ________________________________
> Novos endereços, o Yahoo! que você conhece. Crie um email novo com a sua
> cara @ymail.com ou @rocketmail.com.
> _______________________________________________
> Catalyst-dev mailing list
> Catalyst-dev@lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
>
>

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev



Novos endereços, o Yahoo! que você conhece. Crie um email novo com a sua cara @ymail.com ou @rocketmail.com.
http://br.new.mail.yahoo.com/addresses
Re: Res: Catalyst tutorial [ In reply to ]
On 28 Aug 2008, at 14:45, Daniel Nicoletti wrote:

> sorry but that addres gives me a:
> "Sorry bubba, you aint got no rights to this page."

Edit links won't work unless you've logged in first.. The link on
that page allows you to return to the homepage, whereupon you can
register and account, login, and then that URL will work as expected..

Cheers
t0m


_______________________________________________
Catalyst-dev mailing list
Catalyst-dev@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
Re: Res: Catalyst tutorial [ In reply to ]
On Tue, Aug 26, 2008 at 10:26:05AM -0700, Daniel Nicoletti wrote:
> also in the catalyst tutorial
> there are tow problems one is that
> is sugest the use of .conf (apache like)
> instead of the yaml.

That's not a problem. .conf is the new default and you'll find the FormFu
docs are being steadily updated to help reflect that.

> Caught exception in MyApp::Controller::Books->formfu_create "Error parsing /home/daniel/code/catalyst/MyApp/root/forms/books/formfu_create.conf: Config::General: Cannot create hashref from <constraints> because there is
> already a scalar option 'constraints' with value 'SingleValue'

Config::General should handle that fine. Check you don't have an old version
please?

--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
Re: Res: Catalyst tutorial [ In reply to ]
2008/9/3 Matt S Trout <dbix-class@trout.me.uk>:
> On Tue, Aug 26, 2008 at 10:26:05AM -0700, Daniel Nicoletti wrote:
>> also in the catalyst tutorial
>> there are tow problems one is that
>> is sugest the use of .conf (apache like)
>> instead of the yaml.
>
> That's not a problem. .conf is the new default and you'll find the FormFu
> docs are being steadily updated to help reflect that.

Well, I've changed HTML::FormFu::Manual::Unicode from using myapp.yml
to MyApp->config().
And I've changed the example config in Catalyst-Controller-HTML-FormFu
to use Config::General.

But I'm not sure about changing the core FormFu documentation to
Config::General.
It's probably because there's a lot less FormFu users, than Catalyst
has - but the OP in this thread is the only person I can ever recall
who's posted a message to the FormFu list with non-yaml config.
I think I'm going to have to see if the yaml is a genuine problem for
more users, before spending the time changing all the examples - which
at a rough count, could be over a thousand lines:

$ find lib -name '*.pm' -exec perl -lni -e '$x=1 if /=head/; print
if $x' '{}' \;
$ ack '^ ' lib | wc -l
> 1270

It's also one thing to say "everyone that knows better still uses yaml
anyway" - but I suspect that most new people - of any ability - will
just use what's documented. And I'd really rather not have to support
Config::General rather than yaml - it's a lot more verbose, and it
doesn't support some features that I use in yaml, such as references
to repeated data, and multiple documents in a single file.

Matt - I do appreciate that I've no idea how often this comes up on
irc, and how much pain it may be causing you.
I've tried getting past my firewall by connecting to irc.perl.org with
an ssh-tunnel, but it immediately tries to bounce me to another server
- at which point it stops dead, because my ssh-tunnel can only see
irc.perl.org
If you/anyone knows a way around this, I *will* get back on irc more
regularly, and I'll get a #formfu channel started - which would at
least give you somewhere to punt people asking formfu questions on
#catalyst

In the meantime, I've been thinking of adding a quick script that can
be used at the command line, which uses Config::Any to load up a
config file, and dump the contents using Data::Dumper - to see if the
file's parsed as you expect.
This is the kind of thing I do quite often with a 1-liner, and so
should probably be available for anyone to use more easily.

>> Caught exception in MyApp::Controller::Books->formfu_create "Error parsing /home/daniel/code/catalyst/MyApp/root/forms/books/formfu_create.conf: Config::General: Cannot create hashref from <constraints> because there is
>> already a scalar option 'constraints' with value 'SingleValue'
>
> Config::General should handle that fine. Check you don't have an old version
> please?

I'm using the latest Config::General (2.40), and get the same error message.
It can't combine a scalar value and a hash-ref into a single value:

constraints Required
<constraints>
type = SingleValue
</constraints>

I advise that with Config::General, that you always use the hash-ref varient:

<constraints>
type = Required
</constraints>
<constraints>
type = SingleValue
</constraints>

Because if you use the scalar-value version, when you eventually want
to add a constraint that needs more than just the 'type' set, you'll
need to change all the other constraints to the hashref version,
anyway.

constraint Required
constraint Single
# now can't add a constraint that needs any options set !

Carl

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
Re: Res: Catalyst tutorial [ In reply to ]
On Wed, Sep 3, 2008 at 3:35 AM, Carl Franks <fireartist@gmail.com> wrote:
> [snip]
> Matt - I do appreciate that I've no idea how often this comes up on
> irc, and how much pain it may be causing you.
> I've tried getting past my firewall by connecting to irc.perl.org with
> an ssh-tunnel, but it immediately tries to bounce me to another server
> - at which point it stops dead, because my ssh-tunnel can only see
> irc.perl.org
> If you/anyone knows a way around this, I *will* get back on irc more
> regularly, and I'll get a #formfu channel started - which would at
> least give you somewhere to punt people asking formfu questions on
> #catalyst
> [snip]

You can setup an IRC proxy on an outside server you can get it, and
then connect to that via ssh-tunnel (or, ssh out and then irc from
there in a screen session).

Also, if you set it up to connect directly to one of the irc.perl.org
servers does that work? You can find the direct server list at
http://www.irc.perl.org/servers.mhtml - try one of those rather than
irc.perl.org and see if that helps.


-J

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
Re: Res: Catalyst tutorial [ In reply to ]
"J. Shirley" <jshirley@gmail.com> wrote on 09/03/2008 09:13:26 AM:

> On Wed, Sep 3, 2008 at 3:35 AM, Carl Franks <fireartist@gmail.com> wrote:
> > [snip]
> > Matt - I do appreciate that I've no idea how often this comes up on
> > irc, and how much pain it may be causing you.
> > I've tried getting past my firewall by connecting to irc.perl.org with
> > an ssh-tunnel, but it immediately tries to bounce me to another server
> > - at which point it stops dead, because my ssh-tunnel can only see
> > irc.perl.org
> > If you/anyone knows a way around this, I *will* get back on irc more
> > regularly, and I'll get a #formfu channel started - which would at
> > least give you somewhere to punt people asking formfu questions on
> > #catalyst
> > [snip]
>
> You can setup an IRC proxy on an outside server you can get it, and
> then connect to that via ssh-tunnel (or, ssh out and then irc from
> there in a screen session).
>
> Also, if you set it up to connect directly to one of the irc.perl.org
> servers does that work? You can find the direct server list at
> http://www.irc.perl.org/servers.mhtml - try one of those rather than
> irc.perl.org and see if that helps.
>

yes, irc.perl.org does not actually redirect you, it just has the list of
server ips that it round robins through with short ttl. either use a
specific server from the list above or choose one of the ip addresses
returned for irc.perl.org instead of the domain name.

<<>> DiG 9.4.2-P1 <<>> irc.perl.org
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51045
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;irc.perl.org. IN A

;; ANSWER SECTION:
irc.perl.org. 788 IN CNAME g.irc.perl.org.
g.irc.perl.org. 300 IN A 67.18.187.46
g.irc.perl.org. 300 IN A 72.26.102.142

;; Query time: 87 msec
;; SERVER: 10.19.61.30#53(10.19.61.30)
;; WHEN: Wed Sep 3 10:02:34 2008
;; MSG SIZE rcvd: 78


-Wade


_______________________________________________
Catalyst-dev mailing list
Catalyst-dev@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
Re: Res: Catalyst tutorial [ In reply to ]
On Wed, Sep 03, 2008 at 11:35:29AM +0100, Carl Franks wrote:
> 2008/9/3 Matt S Trout <dbix-class@trout.me.uk>:
> > On Tue, Aug 26, 2008 at 10:26:05AM -0700, Daniel Nicoletti wrote:
> >> also in the catalyst tutorial
> >> there are tow problems one is that
> >> is sugest the use of .conf (apache like)
> >> instead of the yaml.
> >
> > That's not a problem. .conf is the new default and you'll find the FormFu
> > docs are being steadily updated to help reflect that.
>
> Well, I've changed HTML::FormFu::Manual::Unicode from using myapp.yml
> to MyApp->config().
> And I've changed the example config in Catalyst-Controller-HTML-FormFu
> to use Config::General.
>
> But I'm not sure about changing the core FormFu documentation to
> Config::General.
> It's probably because there's a lot less FormFu users, than Catalyst
> has - but the OP in this thread is the only person I can ever recall
> who's posted a message to the FormFu list with non-yaml config.

That's because they're all on here being confused instead.

Anyway, FormFu can keep its own policies on stuff, but the controller etc.
need to document that those config files are *FormFu* configs and nothing
to do with Catalyst.

I'm not trying to force decisions on non-Catalyst-specific stuff - or not
over this, anyway ;) - I'm just trying to make sure the Catalyst-related
stuff's consistent since the change of format is a big thing and I don't
want to have to do it again :)

--
Matt S Trout Need help with your Catalyst or DBIx::Class project?
Technical Director http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://chainsawblues.vox.com/ http://www.shadowcat.co.uk/servers/

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
Re: Res: Catalyst tutorial [ In reply to ]
2008/9/3 J. Shirley <jshirley@gmail.com>:
>
> Also, if you set it up to connect directly to one of the irc.perl.org
> servers does that work? You can find the direct server list at
> http://www.irc.perl.org/servers.mhtml - try one of those rather than
> irc.perl.org and see if that helps.

Cool - I've set up an SSH tunnel directly to one of the mirrors - and
it works fine.
So I'm now "officially" supporting the #formfu channel :)

Cheers,
Carl

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev