Dist::Zilla and Catalyst (Was: [Catalyst] Using the Catalyst Makefile to install

2013-03-08 Thread Greg Matheson
On Fri, 08 Mar 2013, Bill Moseley wrote:

 A bit off the topic, but I've been using Dist::Zilla to help package
 Catalyst apps.   My favorite features are auto versioning, managing the
 Changes file, and automatic dependency creation.  And, of course, having a
 custom PluginBundle that centralizes how we build distributions.   Perhaps
 not for everyone, but worth a look.  Check out the Dist::Zilla::Plugins on
 CPAN.

 But the end result is still just a normal Perl module.   All our modules
 (Catalyst and others) use Dist::Zilla now.

 I have a Dist::Zilla::Plugin::CatalystFiles that helps build the dist and
 builds a custom Makefile.PL.

That appears to be a different module than the 
Dist::Zilla::Plugin::Catalyst on CPAN.

http://www.xenoterracide.com/2010/06/announcing-distzillaplugincatalyst.html
http://search.cpan.org/~xeno/Dist-Zilla-Plugin-Catalyst-0.15/lib/Dist/Zilla/Plugin/Catalyst.pm

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


Re: [Catalyst] Query not working

2012-05-10 Thread Greg Matheson
On Thu, 10 May 2012, Kenneth S Mclane wrote:

 That has not been my experience. I have asked several questions there with 
 little to responses.

In that case, try the #dbix-class channel on irc.perl.org. They 
are responsive, in my experience.

 Yes DBIx::Class, but I am trying to use the result files and models 
 generated by the helper script.



 From:
 Tomas Doran bobtf...@bobtfish.net
 To:
 The elegant MVC web framework catalyst@lists.scsys.co.uk
 Date:
 05/10/2012 09:29 AM
 Subject:
 Re: [Catalyst] Query not working




 On 10 May 2012, at 15:17, Kenneth S Mclane wrote:

  I am trying to port this query to Catalyst: 

 You mean DBIx::Class - Catalyst is totally database agnositc (no database 
 is even required)

 Whilst a lot of people here also use DBIC (and DBIC questions often get 
 asked/answered here), you're generally more likely to get useful advice on 
 the DBIC mailing list.

 Cheers
 t0m


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




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


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


Re: [Catalyst] Setting rel_collision_map in myapp_create.pl

2012-02-09 Thread Greg Matheson
On Thu, 09 Feb 2012, Robert Rothenberg wrote:

 The application that I am working on uses myapp_create.pl to create the
 model from the database schema.

 The problem is that the DBIx::Schema::Loader is creating a relationship with
 a name that is inappropriate, and conflicts with a relationship that I've
 manually created.

tl;dr

Perhaps DBIx::Schema::Loader::Base will help.

   moniker_map
   Overrides the default table name to moniker translation.  ...

   The default behavior is to split on case transition and non-alphanumeric
   boundaries, ..


   Table Name   | Moniker Name
   -
   luser| Luser

Using dbicdump, perhaps:

dbicdump -o dump_directory=./loader -o 
moniker_map='{round=Round,rounds=Rounds}' Tennis::Schema 
dbi:Pg:dbname=tennis002 '' ''

 In this case, there is a table of group, employee and a third table
 employee_group that links employees to groups. The group table has a
 leader field that references an employee who is the group leader. DBIC has
 decided to create a relationship on players called groups that basically
 says what groups the employee is the leader of.  Not a very good name, and
 of course conflicts with the groups relationship that I created, that
 indicates what groups an employee is actually in. (Yes, there is an
 employee_groups relation, but I added the groups relation to bridge that
 indirection.)

 Looking at the documentation for DBIx::Schema::Loader, there is an option
 called rel_collision_map that can supposedly be used to fix this. I'm unsure
 how it works, and even less sure how to pass a hash as an option to the
 myapp_create.pl script.

 If that option is supported, examples would be helpful.

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

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


Re: [Catalyst] Issue with Plugin::Session

2011-01-05 Thread Greg Matheson
On Wed, 05 Jan 2011, jeff robinson wrote:

 Tom
 Time is fine.
 Its the same client and server computers for both the FF and Safari
 tests so one would expect this to have been an issue with FF as well,
 but is not - J

But their reaction to inconsistent times in cookies apparently differ.

 On Wed, Jan 5, 2011 at 2:36 PM, Tomas Doran bobtf...@bobtfish.net wrote:

  On 5 Jan 2011, at 16:07, jeff robinson wrote:

  Hi
  Having a prblem with Safari and IE browsers and the Session plugin.
  The app works fine with Firefox, but session data is being reset
  between requests with these other browsers.

  Is the time correct on your server and your client?

  This issue is usually caused by incorrect expiry dates in the cookies issued
  (due the the server having the wrong time).

  Cheers
  t0m

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


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

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


Re: [Catalyst] [ANNOUNCE] Catalyst-Runtime 5.80019

2010-01-30 Thread Greg Matheson
On Fri, 29 Jan 2010, Florian Ragwitz wrote:

   Bug fixed:
- The above noted / = %2F encoding in uri_for_action or uri_for with
  an action object has been fixed to not just encode the first slash in
  any set of args/captures.

It now encodes all the slashes and my problem has been fixed.

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


Re: [Catalyst] [ANNOUNCE] Catalyst-Runtime 5.80015

2009-12-03 Thread Greg Matheson
On Thu, 03 Dec 2009, Tomas Doran wrote:


 On 3 Dec 2009, at 13:11, Octavian Râsnita wrote:

 From: Tomas Doran bobtf...@bobtfish.net
 Hiya.

 I'm pleased to announce a new stable release of Catalyst-Runtime  
 (5.80015). This release mainly wraps up the new features and  
 bugfixes previewed in 5.80014_01 and 5.80014_02.


 I've tried to install it under Windows XP Pro, and it gave the  
 following error:

 Interesting, especially as it's off by 1 byte only.

That sounds like it might be a new line issue, if only one line was involved.

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


Re: [Catalyst] Catalyst::Plugin::Email not working

2009-12-02 Thread Greg Matheson
On Wed, 02 Dec 2009, Meeko wrote:

 Hi everyone.  I have been developing an app for quite some time on a local
 machine here (OS X 10.4) which at various times throughout its life it needs
 to send out e-mails.  

 It's been working great during development, I get all the e-mails when they
 are supposed to be going out. The problem is that now that I am getting
 close to finished, I have done a test deployment to my public web server
 (CentOS 5.2), and now e-mails no longer get sent.  

Is SELinux enabled? See the httpd_selinux manpage.

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


Re: [Catalyst] Getting strange warning each time a request is made to myApp

2009-03-13 Thread Greg Matheson
On Sat, 14 Mar 2009, kakim...@tpg.com.au wrote:

   - extract START ---

   [warn] Used regexp fallback for $c-model('myApp::View::HTML'),
   which
   found 'myApp::View::HTML=HASH(0x8ef7b50)'. Relying on regexp
   fallback
   behavior for component resolution is unreliable and unsafe. You
   probably
   meant $c-model('myApp::View::HTML=HASH(0x8ef7b50)') instead of
   $c-model{'myApp::View::HTML'}, but if you really wanted to
  search,
   pass
   in a regexp as the argument like so:
  $c-model(qr/myApp::View::HTML/)
   at
   /usr/local/lib/perl5/site_perl/5.8.9/Catalyst/Action/RenderView.pm
   line 56
   [debug] Rendering template index.tt2
   [debug] Applying HTML page layout wrappers to index.tt2

   - extract END ---

You're not calling $c-model('Table') instead of 
$c-model('DB::Table') are you?

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


Re: [Catalyst] [Announce] Catalyst::Runtime 5.7099_04. IMPORTANT; PLEASE TEST!

2009-01-13 Thread Greg Matheson
On Tue, 13 Jan 2009, Oleg Kostyuk wrote:

 2) added ru and ua translations (see in attachment)

 Index: lib/Catalyst/Engine.pm
 ===
 --- lib/Catalyst/Engine.pm(revision 9082)
 +++ lib/Catalyst/Engine.pm(working copy)
 @@ -158,6 +158,8 @@
  (dk) Venligst prov igen senere
  (pl) Prosze sprobowac pozniej
  (pt) Por favor volte mais tarde
 +(ru)  ?? ?? ??
 +(ua) ??  ?? ??
  /pre

  $name = '';

So that's where those messages are!
Here's some non-native Chinese and Japanese ones.

diff -u /usr/lib/perl5/vendor_perl/5.10.0/Catalyst/Engine.pm 
/usr/lib/perl5/vendor_perl/5.10.0/Catalyst/Engine.pm.orig
--- /usr/lib/perl5/vendor_perl/5.10.0/Catalyst/Engine.pm2009-01-14 
10:28:21.0 +0800
+++ /usr/lib/perl5/vendor_perl/5.10.0/Catalyst/Engine.pm.orig   2009-01-14 
10:24:55.0 +0800
@@ -157,8 +157,6 @@
 (no) Vennligst prov igjen senere
 (dk) Venligst prov igen senere
 (pl) Prosze sprobowac pozniej
-(zh) ?
-(ja) ??
 /pre
 
 $name = '';


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


Re: [Catalyst] Perl 5.10 warnings. (used only once)

2009-01-10 Thread Greg Matheson
On Sun, 11 Jan 2009, Chisel Wright wrote:

 On Fri, Nov 07, 2008 at 12:09:54AM +, Greg Matheson wrote:
  On Thu, 06 Nov 2008, Bill Moseley wrote:

Name Catalyst::Controller::setup_dispatcher used only once:
possible typo at /usr/share/perl/5.10/NEXT.pm line 58.

   I patched my NEXT.pm which seemed to suppress it.  I've attached.
   Does just setting a scalar by the same name to undef seem like a
   reasonable way to suppress this noise?

  Someone on #perl suggested 'no warnings only', or something.

 Was this resolved?

 I've not been able to find anything tonight. I know it's not critical,
 but I'd quite like to clean up my output/logs.

perllexwarn doesn't say what no warnings 'once' will do, but 
patched into the offending module, it turns off the warning about 
names used only once.

The 'warnings' man page also doesn't say it will do this either.

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


Re: [Catalyst] Perl 5.10 warnings. (used only once)

2008-11-06 Thread Greg Matheson
On Thu, 06 Nov 2008, Bill Moseley wrote:

  Name Catalyst::Controller::setup_dispatcher used only once:
  possible typo at /usr/share/perl/5.10/NEXT.pm line 58.

 I patched my NEXT.pm which seemed to suppress it.  I've attached.
 Does just setting a scalar by the same name to undef seem like a
 reasonable way to suppress this noise?

Someone on #perl suggested 'no warnings only', or something.

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


Re: [Catalyst] [patch] Catalyst::Authentication::Store::DBIx::Class's authenticate parameters Documentation

2008-09-16 Thread Greg Matheson
On Tue, 16 Sep 2008, Jason Kuri wrote:

 I've updated the id_field documentation, hopefully to clear things
 up.  I'll see about pushing a new rev up in the next few days.

 The new id_field doc snippit is below.

 =item id_field

 ...
 Note that this is used BONLY when restoring a user from the session
 and
 has no bearing whatsoever in the initial authentication process. Note
 also
 that if use_userdata_from_session is enabled, this config parameter
 is not used at all.

 --- snip ---

 Does that clear things up for you?

Thanks, that helps.

Setting id_field in the configuration to 
Catalyst::Authentication::Store::DBIx::Class, I was just 
cargo-culting from the Catalyst::Manual::Tutorial::Authentication 
documentation.

If I hadn't seen it there, I wouldn't have tried fiddling with 
it.

And I see the reason my application started working was not so much my 
fiddling with id_field, as my accidental inclusion of the 
primary key in the arguments to authenticate.

Perhaps the id_field option should be removed from the Tutorial.


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


[Catalyst] [patch] Catalyst::Authentication::Store::DBIx::Class's authenticate parameters Documentation

2008-09-15 Thread Greg Matheson
t0m and others on #catalyst helped me understand that the 
'username' key-value pair I was passing to authenticate was 
resulting in the first user in the user_class table being 
authenticated, a problem that has apparently been met by others 
too. See the message at 
http://lists.scsys.co.uk/pipermail/catalyst/2008-August/019560.html.

I had a different table column in id_field.

I thought the POD could be made more informative about this 
problem, so prepared a patch.

What it does is replace 'username' as the keyname passed to 
authenticate with 'user_id', the value of the id_field 
configuration option used in the example in the Synopsis.

However, the exchange between Matt Trout and Jay Kuri following 
the above message has muddied my understanding and I haven't 
cleared this confusion by reading the source or by reading about 
DBIx::Class's search routine.

So feel freee to ignore this patch if it makes what appears to be 
'widespread' confusion worse.

[EMAIL PROTECTED] dic]$ diff -u Class.pm.orig Class.pm
--- Class.pm.orig   2008-09-15 17:39:37.0 +0800
+++ Class.pm2008-09-15 17:48:30.0 +0800
@@ -127,7 +127,7 @@
 my ( $self, $c ) = @_;
 
 $c-authenticate({  
-  username = $c-req-params-username,
+  user_id = $c-req-params-username,
   password = $c-req-params-password,
   status = [ 'registered', 'loggedin', 'active']
   }))
@@ -270,7 +270,7 @@
 is below:
 
 if ($c-authenticate({  
-  username = $c-req-params-{'username'},
+  user_id = $c-req-params-{'username'},
   password = $c-req-params-{'password'},
   status = [ 'registered', 'active', 'loggedin']
  })) {
@@ -278,11 +278,12 @@
 # ... authenticated user code here
 }
 
-The above example would attempt to retrieve a user whose username column
-matched the username provided, and whose status column matched one of the
-values provided. These name = value pairs are used more or less directly in
-the DBIx::Class' search() routine, so in most cases, you can use DBIx::Class
-syntax to retrieve the user according to whatever rules you have.
+The above example would attempt to retrieve a user whose username column (here,
+'user_id') matched the username provided, and whose status column matched one
+of the values provided. (The username column name may be specified by the
+id_field configuration option.) These name = value pairs are used more or less
+directly in the DBIx::Class' search() routine, so in most cases, you can use
+DBIx::Class syntax to retrieve the user according to whatever rules you have.
 
 NOTE: Because the password in most cases is encrypted - it is not used
 directly but it's encryption and comparison with the value provided is usually



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