Re: [Catalyst] Catalyst Unicode woes ...

2007-08-09 Thread Jonas Alves
On 09/08/07, Pedro Melo [EMAIL PROTECTED] wrote:
 Hi,

 On Aug 9, 2007, at 10:40 AM, Tatsuhiko Miyagawa wrote:

  Similarly even if your templates are encoded in utf-8,
  Template-Toolkit doesn't know which encoding they are in, until you
  set BOM to your templates or use Template::Provider::Encoding to
  explicitly specify the encoding to decode the template.

 hmms.. Is there a third way, just telling TT that all my templates
 are in UTF8? Setting the BOM is not easy with some editors.

Looking at Template::Provider::Encoding description:

Template::Provider::Encoding is a Template Provider subclass to
decode template using its declaration. You have to declare encoding of
the template in the head (1st line) of template using (fake) encoding
TT plugin. Otherwise the template is handled as utf-8.

So if you want utf8 you just need to use T::P::E and don't need to
explicitly specify the encoding.

-- 
Jonas

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Storing Login Information

2007-08-09 Thread Jonas Alves
On 09/08/07, Patrick McDonnell [EMAIL PROTECTED] wrote:
 Hello -

 I'm working on a Catalyst app, mostly just to amuse myself, that is supposed
 to be a webmail/calendar/address book/user account management app.  All of
 the user account information, as well as the address book, is stored in an
 LDAP directory, so authenticating against that is not a problem.  I am
 running into a problem if I want the user to be able to connect to an IMAP
 server, as that would require that user provide their username/password
 again.  Here's basically how my app is currently working:

 User logs in, auth data is checked against LDAP.  Once logged in, the user
 is trusted to do various things based on my authorization scheme.
 Say the user wants to check his email.  I'm trying to use Net::IMAP::Simple
 to connect to my IMAP server.  However, to log in, the module needs the
 username and password.  So, the two most obvious options are to 1) have the
 user provide his authentication data again; or 2) store the user's password
 in the session.  Neither sounds like a good idea, the first is just
 annoying, and the second seems like a security vulnerability.

 So, does anyone have any advice on how to procede.  One idea I had was the
 login to the IMAP server the first time the user logs in to the web app, and
 then pass around the IMAP object with the session, but that seems kind of
 ugly.  Any ideas?

 Thanks.


You can create a second IMAP server that uses a secret token as the
user password.
Then you just need to auth against that server with the user login and
a password like sha1_hex($username, $your_secret), or something like
that.

Cheers,
-- 
Jonas

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Insecure dependency while running a cat app under Apache2

2007-03-26 Thread Jonas Alves

Hi,
When I try to run my catalyst app under Apache2 I get this error message:

[error] Caught exception in MyApp::Controller::Login-form Insecure
dependency in eval while running setgid at
/usr/local/share/perl/5.8.7/CGI/FormBuilder/Field.pm line 412.

It runs ok in the development server. Is Apache trying to run my app in
taint mode? Why?
Here is my Apache configuration:

VirtualHost *:80
   ServerName  myapp.dev
   DocumentRoot /servers/sites/myapp/root
   Perl
   use lib '/servers/sites/myapp/lib';
   use MyApp;
   /Perl
   Location /
   SetHandler modperl
   PerlResponseHandler MyApp
   /Location
   Location /static
   SetHandler default-handler
   /Location
/VirtualHost

Hope someone can welp me with this...

Thanks
--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Re: PATCH - Multiple ActionClass attributes

2007-02-28 Thread Jonas Alves

Ups, wrong mailling list. I will resend it to catalyst-dev.
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] PATCH - Multiple ActionClass attributes

2007-02-28 Thread Jonas Alves

Hi,

I wrote a patch that permits to use multiple ActionClass attributes in a
controller action.
Here is the synopsys:

=head1 USING MULTIPLE ACTIONS

To use multiple actions you just need to had more ActionClass
attributes:

 sub Hello :Local :ActionClass('SayBefore') ActionClass('SayAfter') {
   $c-res-output( 'Hello '.$c-stash-{what} );
 }

Attention that if you are using multiple actions you probably want to
use Class::C3 dispatch order. With NEXT just the first ActionClass will
be called. Here you have an example:

 package Catalyst::Action::SayBefore;
 use Class::C3;
 use base 'Catalyst::Action';

 sub execute {
   my $self = shift;
   my ( $controller, $c, $test ) = @_;
   $c-stash-{what} = 'world';
   $self-next::method( @_ );
 };

 1;

 package Catalyst::Action::SayAfter;
 use Class::C3;
 use base 'Catalyst::Action';

 sub execute {
   my $self = shift;
   my ( $controller, $c, $test ) = @_;
   $self-next::method( @_ );
   $c-res-output( 'Bye '.$c-stash-{what} );
 };

 1;

Patch with tests and docs attached.


catalyst_multiple_action_classes.diff
Description: Binary data


documentation.diff
Description: Binary data
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Reaction Action

2007-02-07 Thread Jonas Alves

On 07/02/07, Matt S Trout [EMAIL PROTECTED] wrote:



On 6 Feb 2007, at 18:21, Jonas Alves wrote:

 Hi all,
 I'm trying to do a Reaction form to do an advanced search.
 This is what I have for now:

 package MyApp::Model::Action::Search;
 use Reaction::Class;
 use Reaction::InterfaceModel::Action;

 class Search is 'Reaction::InterfaceModel::Action', which {
   has title  = (isa = 'SimpleStr', is = 'rw');
   has state= (isa = 'Str',  is = 'rw',
valid_value_names = sub { [qw/One Two
 Three/] },
valid_values  = sub { [qw/1 2 3/] },
name_to_value_map = sub { {qw/One 1 Two 2
 Three 3/} },
value_to_name_map = sub { {qw/1 One 2 Two 3
 Three/} },
   );
   implements do_apply = sub {};
 };


I'd just pass valid_values = sub { [ qw/One Two Three/ ] } and treat
it as an enum until you get to do_apply - do_apply should return
appropriate data, perhaps doing the search itself and returning the
resultset. Then you can pass an on_apply_callback to the ActionForm
that populates the ListView off the returned rs.



I will try that. Thanks :)
What is the best way to validate the form only when it is submited? I don't
want the messages to be displayed the first time the form is rendered.

Thanks,
--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Reaction Action

2007-02-06 Thread Jonas Alves

Hi all,
I'm trying to do a Reaction form to do an advanced search.
This is what I have for now:

package MyApp::Model::Action::Search;
use Reaction::Class;
use Reaction::InterfaceModel::Action;

class Search is 'Reaction::InterfaceModel::Action', which {
 has title  = (isa = 'SimpleStr', is = 'rw');
 has state= (isa = 'Str',  is = 'rw',
  valid_value_names = sub { [qw/One Two Three/] },
  valid_values  = sub { [qw/1 2 3/] },
  name_to_value_map = sub { {qw/One 1 Two 2 Three 3/}
},
  value_to_name_map = sub { {qw/1 One 2 Two 3 Three/}
},
 );
 implements do_apply = sub {};
};

1;

But when it renders the form I get the following error message:
undef error - Can't call method display_name without a package or object
reference at
/usr/local/share/perl/5.8.7/Reaction/UI/ViewPort/Field/ChooseOne.pm line 72.

It appears that 'build_value_to_name_map' method is called even when I pass
the value_to_name_map parameter. I'm I doing something wrong? Maybe the
valid_values parameter should not be used this way.

Thanks,
--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Re: Reaction Action

2007-02-06 Thread Jonas Alves

On 06/02/07, Jonas Alves [EMAIL PROTECTED] wrote:


Hi all,
I'm trying to do a Reaction form to do an advanced search.
This is what I have for now:

package MyApp::Model::Action::Search;
use Reaction::Class;
use Reaction::InterfaceModel::Action;

class Search is 'Reaction::InterfaceModel::Action', which {
  has title  = (isa = 'SimpleStr', is = 'rw');
  has state= (isa = 'Str',  is = 'rw',
   valid_value_names = sub { [qw/One Two Three/] },
   valid_values  = sub { [qw/1 2 3/] },
   name_to_value_map = sub { {qw/One 1 Two 2 Three
3/} },
   value_to_name_map = sub { {qw/1 One 2 Two 3
Three/} },
  );
  implements do_apply = sub {};
};

1;

But when it renders the form I get the following error message:
undef error - Can't call method display_name without a package or object
reference at
/usr/local/share/perl/5.8.7/Reaction/UI/ViewPort/Field/ChooseOne.pm line 72.

It appears that 'build_value_to_name_map' method is called even when I
pass the value_to_name_map parameter. I'm I doing something wrong? Maybe the
valid_values parameter should not be used this way.

Thanks,
--
Jonas



Hum, I was being silly.

I have to pass the attributes to the ActionForm like this:

$self-push_viewport(
   ActionForm,
   action = $c-model('Action::Search')-new(...),
   Field = {
   state = {
  valid_value_names = [...],
  valid_values  = [...],
  name_to_value_map = {...},
  value_to_name_map = {...},
   },
   },
   );

--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] chained actions, knowing if current action is an endpoint or not

2007-02-01 Thread Jonas Alves

On 01/02/07, Dami Laurent (PJ) [EMAIL PROTECTED] wrote:


 Dear Catalysters,

I would like to set up an action chain where the entry point to the chain
(first action) has to do different things depending on whether there is
another action down the chain or not.

Is there a way in the API to ask Catalyst about what is pending in the
rest of the action chain ? or a way to know if the current action is being
used as an endpoint or not ?

Thanks in advance, L. Dami



I think you can't have one action that is both an endpoint and a normal
chained action at the same time. You have to define two actions with the
same PathPart.

--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Reaction Authentication

2007-01-25 Thread Jonas Alves

On 25/01/07, Guillermo Roditi [EMAIL PROTECTED] wrote:


what i meant is that you get new_password and confirm_new password,
but you still need the original password field

see code for
Reaction::InterfaceModel::Action::DBIC::User::Role::SetPassword;



Yes, but i have the password field in the model passed to target_model.
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Reaction Authentication

2007-01-16 Thread Jonas Alves

On 16/01/07, Matt S Trout [EMAIL PROTECTED] wrote:



On 15 Jan 2007, at 18:56, Jonas Alves wrote:



 On 15/01/07, Jonas Alves [EMAIL PROTECTED] wrote: On
 14/01/07, Ash Berlin [EMAIL PROTECTED] wrote:
 Jonas Alves wrote:
  Hi all,
  I was starting to put authentication in a Reaction application
 that i'm
  developing when I saw that Reaction has this classes:
 
  Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques;
  Reaction::InterfaceModel::Action::DBIC::User::ChangePassword;
  Reaction::InterfaceModel::Action::DBIC::User::ResetPassword;
  Reaction::InterfaceModel::Action::DBIC::User::Role::SetPassword;
  Reaction::InterfaceModel::Action::User::ChangePassword;
  Reaction::InterfaceModel::Action::User::ResetPassword;
  Reaction::InterfaceModel::Action::User::SetPassword;
 
  It appears that Reaction already has some facilities to do auth
 stuff.
  How can I use this classes to help me?
 
  Thanks a lot,
  --
  Jonas
 

 Not having used Reaction myself BUT I suspect that these are for
 updating existing profile info in the DB.

 Do the authentication the same way you would in a normal Catalyst app.

 Ash

 Thanks Ash,
 I already have authentication the same way i would in a normal
 Catalyst app. But now I would like to use the Reaction TT widgets
 to create a custom form with validation for authentication and
 another one to register a user. I read the source but could not
 achieved it.
 Matt, can you help?

 Thanks a lot,
 --
 Jonas


 Hi again,
 I've now created an Action class do handle the login. Here is the
 code:

 package MyApp::Model::Action::AuthUser;
 use Reaction::Class;
 use Reaction::Types::DBIC;
 use Reaction::InterfaceModel::Action;
 use Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques;


 class AuthUser is 'Reaction::InterfaceModel::Action', which {
   does 'Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques';
   has '+target_model' = (isa = 'DBIx::Class::ResultSet');

   has 'username' = (isa = 'NonEmptySimpleStr', is = 'rw',
set_or_lazy_fail('username'));
   has 'password' = (isa = 'StrongPassword',is = 'rw',
set_or_lazy_fail('password'));


   has _unique_constraint_results = (
 isa = 'HashRef',
 is = 'rw',
 required = 1,
 default = sub { {} },
 metaclass = 'Moose::Meta::Attribute'
   );

   implements do_apply = as {
 my $self = shift;
 my $args = $self-parameter_hashref;
 warn '== ' .Dumper $args;
 # do auth stuff here
   };
 };

 1;

 But the form is rendered just with the ok and close buttons.
 The fields are not displayed.
 I put some debug in ActionForm.pm BUILD method and found that $self-
 _has_field_map() is always false and $action-parameter_attributes
 () does not return anything.
 What am i doing wrong?


You have to put the attributes within the class block or the
superclass hasn't been set yet, which means the attributes default to
the wrong meta-attribute class and aren't created as
ParameterAttribute objects. At which point, it doesn't work :)



It makes sense.
Thanks a lot Matt. :)
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Reaction Authentication

2007-01-15 Thread Jonas Alves

On 14/01/07, Ash Berlin [EMAIL PROTECTED] wrote:


Jonas Alves wrote:
 Hi all,
 I was starting to put authentication in a Reaction application that i'm
 developing when I saw that Reaction has this classes:

 Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques;
 Reaction::InterfaceModel::Action::DBIC::User::ChangePassword;
 Reaction::InterfaceModel::Action::DBIC::User::ResetPassword;
 Reaction::InterfaceModel::Action::DBIC::User::Role::SetPassword;
 Reaction::InterfaceModel::Action::User::ChangePassword;
 Reaction::InterfaceModel::Action::User::ResetPassword;
 Reaction::InterfaceModel::Action::User::SetPassword;

 It appears that Reaction already has some facilities to do auth stuff.
 How can I use this classes to help me?

 Thanks a lot,
 --
 Jonas


Not having used Reaction myself BUT I suspect that these are for
updating existing profile info in the DB.

Do the authentication the same way you would in a normal Catalyst app.

Ash



Thanks Ash,
I already have authentication the same way i would in a normal Catalyst app.
But now I would like to use the Reaction TT widgets to create a custom form
with validation for authentication and another one to register a user. I
read the source but could not achieved it.
Matt, can you help?

Thanks a lot,
--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Reaction Authentication

2007-01-15 Thread Jonas Alves

On 15/01/07, Jonas Alves [EMAIL PROTECTED] wrote:


On 14/01/07, Ash Berlin [EMAIL PROTECTED] wrote:

 Jonas Alves wrote:
  Hi all,
  I was starting to put authentication in a Reaction application that
 i'm
  developing when I saw that Reaction has this classes:
 
  Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques;
  Reaction::InterfaceModel::Action::DBIC::User::ChangePassword;
  Reaction::InterfaceModel::Action::DBIC::User::ResetPassword;
  Reaction::InterfaceModel::Action::DBIC::User::Role::SetPassword;
  Reaction::InterfaceModel::Action::User::ChangePassword;
  Reaction::InterfaceModel::Action::User::ResetPassword;
  Reaction::InterfaceModel::Action::User::SetPassword;
 
  It appears that Reaction already has some facilities to do auth stuff.
  How can I use this classes to help me?
 
  Thanks a lot,
  --
  Jonas
 

 Not having used Reaction myself BUT I suspect that these are for
 updating existing profile info in the DB.

 Do the authentication the same way you would in a normal Catalyst app.

 Ash


Thanks Ash,
I already have authentication the same way i would in a normal Catalyst
app. But now I would like to use the Reaction TT widgets to create a custom
form with validation for authentication and another one to register a user.
I read the source but could not achieved it.
Matt, can you help?

Thanks a lot,
--
Jonas



Hi again,
I've now created an Action class do handle the login. Here is the code:

package MyApp::Model::Action::AuthUser;
use Reaction::Class;
use Reaction::Types::DBIC;
use Reaction::InterfaceModel::Action;
use Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques;

has 'username' = (isa = 'NonEmptySimpleStr', is = 'rw',
set_or_lazy_fail('username'));
has 'password' = (isa = 'StrongPassword',is = 'rw',
set_or_lazy_fail('password'));

class AuthUser is 'Reaction::InterfaceModel::Action', which {
 does 'Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques';
 has '+target_model' = (isa = 'DBIx::Class::ResultSet');

 has _unique_constraint_results = (
   isa = 'HashRef',
   is = 'rw',
   required = 1,
   default = sub { {} },
   metaclass = 'Moose::Meta::Attribute'
 );

 implements do_apply = as {
   my $self = shift;
   my $args = $self-parameter_hashref;
   warn '== ' .Dumper $args;
   # do auth stuff here
 };
};

1;

And a controller to handle it:

package MyApp::Controller::Login;
use strict;
use warnings;
use base 'Reaction::UI::CRUDController';
use Reaction::Class;
use aliased 'Reaction::UI::ViewPort::ListView';
use aliased 'Reaction::UI::ViewPort::ActionForm';
use aliased 'Reaction::UI::ViewPort';

__PACKAGE__-config(
 action = { base  = { Chained = '/base', PathPart = 'login' },
 login = { ViewPort = { layout = 'login_form' } },
},
);

sub base :Action :CaptureArgs(0) {
   my ($self, $c) = @_;
}

sub login :Chained('base') :PathPart('') :Args(0) {
   my ($self, $c) = @_;
   my $action = $c-model('Action::AuthUser')
 -new( target_model = $c-model('DBIC::User'), ctx = $c,);
   $self-push_viewport(
   ActionForm,
   action = $action,
   #next_action = 'list',
   );
}

1;

But the form is rendered just with the ok and close buttons. The fields
are not displayed.
I put some debug in ActionForm.pm BUILD method and found that
$self-_has_field_map() is always false and $action-parameter_attributes()
does not return anything.
What am i doing wrong?

Hope you can help me.

--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Reaction Authentication

2007-01-14 Thread Jonas Alves

Hi all,
I was starting to put authentication in a Reaction application that i'm
developing when I saw that Reaction has this classes:

Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques;
Reaction::InterfaceModel::Action::DBIC::User::ChangePassword;
Reaction::InterfaceModel::Action::DBIC::User::ResetPassword;
Reaction::InterfaceModel::Action::DBIC::User::Role::SetPassword;
Reaction::InterfaceModel::Action::User::ChangePassword;
Reaction::InterfaceModel::Action::User::ResetPassword;
Reaction::InterfaceModel::Action::User::SetPassword;

It appears that Reaction already has some facilities to do auth stuff. How
can I use this classes to help me?

Thanks a lot,
--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Reaction Widgets questions

2007-01-12 Thread Jonas Alves

Hi,
I'm trying Reaction for the first time. I already got it to work using
the CRUDController against some tables i have in a database.
Now i'm trying to change the widgets used to display the form. How can
i tell Reaction that one field type is a
Reaction::UI::ViewPort::Field::* class?
I also want to create a new controller that show in the form just some
of the fields of a table. Is this possible? How can i do it?

Thanks for your help,
--
Jonas

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Re: Reaction Widgets questions

2007-01-12 Thread Jonas Alves

On 12/01/07, Jonas Alves [EMAIL PROTECTED] wrote:

Hi,
I'm trying Reaction for the first time. I already got it to work using
the CRUDController against some tables i have in a database.
Now i'm trying to change the widgets used to display the form. How can
i tell Reaction that one field type is a
Reaction::UI::ViewPort::Field::* class?


Ok, i guess i found that one. The build_fields_for_type_* method in
the ActionFom.pm class do it when call the build_simple_field method.
So to get a Password field i just have to say that my field isa =
'Password'.


I also want to create a new controller that show in the form just some
of the fields of a table. Is this possible? How can i do it?

Thanks for your help,
--
Jonas



___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] schema

2006-12-26 Thread Jonas Alves

  my $barneys = $c-model('DB::Person')-search({name = 'barney'});

instead of

  my $schema = $c-model('DB');
  my $barnes = $schema-resultset('Person')-search({name = 'barney'});

And I don't think Model::DBIC::Schema pays attention to the default_model
setting.



He can use the default_model setting and use
$c-model-resultset('Person') to get the Person resultset.

--
Jonas

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Configuring Catalyst::Model::DBIC::Schema from YAML

2006-10-05 Thread Jonas Alves
On 05/10/06, Jonathan Rockway [EMAIL PROTECTED] wrote:
 I'll put it in Catalyst svn and fix anything obvious, if you want, but
 since I don't actually use the module,  I don't want to commit to
 maintaining it long term.  Hopefully a user will step forward to
 maintain it, but if not, I'll deal with it for now.

 Do you keep it in svn, or do you use some other RCS?  I would prefer to
 import the whole change history, if possible (never know when you need
 to go back to an older version for whatever reason).


No Jonathan, i don't have the MicroMason view in any RCS. Was a very
small module that didn't use very much. Putting it in the Catalyst svn
is a great idea. Thanks very much. I can make a new release with the
bug fix after that. Or i can give you PAUSE access to the module.

-- 
Jonas

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Forms and Plugins and Tutorials, oh my!!

2006-08-18 Thread Jonas Alves
On 18/08/06, Carl Franks [EMAIL PROTECTED] wrote:
 On 18/08/06, Jonas Alves [EMAIL PROTECTED] wrote:
  On 18/08/06, Carl Franks [EMAIL PROTECTED] wrote:
  
   If you don't want to manually download the dojo library, it needs
   Catalyst::Plugin::Dojo which currently uses HTML::Dojo, but will be
   changed to use Alien::Dojo once that's merged with HTML::Dojo. - see
   the previous discussion on this list, titled Alien-Dojo / HTML-Dojo
   merger suggestions
  
   If you're able to help at all with developing these, it'd be most welcome.
   The first priority is probably rewriting Alien::Dojo, along the lines
   mentioned in the Alien-Dojo / HTML-Dojo merger suggestions email.
 
  Hi Carl,
  I would like to help developing these modules. Could you give some
  guidance in what needs to be done.
  I really need HTML::Widget::Dojo for the future versions of InstantCRUD.

 At the moment, there's only been 1 release of Alien::Dojo, and it's broken.
 The author is happy to hand over maintenance of it.

 The message mentioned above is here:
 http://lists.rawmode.org/pipermail/catalyst/2006-June/008222.html
 This is Yuval's resonse:
 http://lists.rawmode.org/pipermail/catalyst/2006-June/008225.html
 It seems a bit over-engineered to me, but Yuval is the man when it
 comes to design, so I bow to him. Unfortunately, I don't have the time
 to work on it - it's a minor issue for me, as it's so easy to manually
 download the dojo-ajax release from the website.

 As HTML-Widget-Dojo stands, I think the latest in subversion worked ok
 with dojo v0.3.
 Dojo v0.3.1 has since been released, so we need to check whether the
 widgets we use have had incompatable changes.
 I had posted a few bug reports - I'll need to search for them and see
 if they've been addressed.

 This thread also mentions a couple of issues that might still be outstanding.
 http://lists.rawmode.org/pipermail/html-widget/2006-May/thread.html#2

 Feel free to ask anything else.
 Anything specific to HTML-Widget-Dojo should probably be on the H-W list 
 though.

 Cheers,
 Carl

Thanks Carl. I will go to holidays today. But i will take a look at it
when i come back.

Cheers,
Jonas

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/