Re: [Catalyst] how to implement Transactions (over different db tables) in a Catalyst project

2009-07-07 Thread Ali M.
Kakimoto

I recommend you read this article
http://blog.urth.org/2009/07/what-is-catalyst-really.html

It might help you understand more when its a Catalyst Issue or a
another component issue!
And help you better trouble shoot your problems.

Apparently Catalyst will help you send a request to the data model and
return the request result to a view
The content of the request and its semantic apparently from this
conversation and the article is the Model responsibility

So if the Model is Transaction capable, you will have transaction!
Can transactions be implemented at the Catalyst/glue level, apparently
Catalyst was not conceived to do so!

I hope this helped!

___
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] default : Local v. default : Path

2009-07-07 Thread Paul Makepeace
On Mon, Jul 6, 2009 at 1:51 PM, Tomas Doranbobtf...@bobtfish.net wrote:

 On 6 Jul 2009, at 18:14, Paul Makepeace wrote:

 We just upgraded from 5.80005 to 5.80007 and default : Local is no longer
 matching $controller/ (i.e. requires $controller/default)

 I was curious what the difference is, and flagging it for anyone else.

 Yes, sorry about that - it's a regression / correctness fix. 5.80005
 considered anything called 'default' to be a default method, no matter what
 attributes you have it - which was a huge pile of fail..

 The incorrect behavior was:

 sub default : Chained('/') PathPart('foobarbaz') Args(0) = became
 /mycontrollernamespace/.*

 The correct behavior is:

 sub default : Local = asking for mycontrollernamespace/default

 sub default : Private = asking to be last-case fallback for
 mycontrollernamespace/.*

My app recently started failing with default : Private. IIRC at YAPC10
mst said this was a  relic of bygone Catalyst days.

So what does default : Path actually _mean_? The docs say,

Path actions match things starting with a precise specified path, and
nothing else. and Empty Path definitions match on the namespace
only, exactly like :Global.

My reading of that is that :Path means *any* sub (not just default)
would match /$controller - is that right?

 This is somewhat a regression on 5.7, and somewhat a fix - as we now
 correctly handle priorities in all cases with default / Path actions,
 allowing the most specific action to match in all cases.

 FWIW, IMO,
 http://search.cpan.org/~hkclark/Catalyst-Manual-5.8000/lib/Catalyst/Manual/Intro.pod#Built-in_special_actions
 is a slightly odd place to be documenting in reference style the actions. Is
 there another place? This is one of those things I keep expecting has a home
 and then eventually finding back in the Manual's intro.

 I totally agree. Please nominate where it should be (where did you look
 hardest that it wasn't), and we'll put it there instead, with the
 clarifications to the expected behavior you're about to make if it isn't
 crystal as-is.. :)

I'll have a think and get back to you after my Vegas fuzz has cleared.

Thanks for the clear explanations!

Paul

___
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] Themes, skins, templates and componentized UI?

2009-07-07 Thread Zbigniew Lukasiak
On Mon, Jul 6, 2009 at 9:55 PM, Gunnar Strandgunnarstr...@yahoo.com wrote:

 Hi,

 I am a little new in the web design area. I'm trying to design an
 application where the view part must be simple to replace by whomever
 installs it, with elements of their own design. This would work
 comparable to themes or skins. I've done some googling, but I
 haven't got any obvious hits on this. The closest I _think_ is
 CatalystX::Usul, but I haven't really understood if that's what I'm
 looking for :-)

 Also, I would also want the person installing the application to be able
 to restructure the visual parts using components, where a component
 could for instance be a result ticker, main menu, member table or
 such. Perhaps in the way that Joomla does, but the components will be
 application specific. It's much a matter of deciding what components are
 present in which views and where.

 I imagine, for instance, a collection of widgets (button,
 drop-down-list, text field etc) which are reused in the TT templates. A
 component would then use these widgets as building blocks, populating
 them using data from the stash. A view (webpage) would be a template
 including one or more of these components. A theme could then override
 any widgets of choice to change the look-and-feel of the whole
 application instantly.

 Am I approaching this from the right direction and does anyone know if
 there exists a framework similar to this to use with Catalyst?

 Or should I perhaps go barking up the TT tree? ;-)

I am working on CatalystX::Elements with the first one being Comments
- I am not sure if it goes in the same direction - but it seems close.
  The main goal is providing Catalyst feature addons - that could be
used as kind of scaffolding - that is they should be easy to assemble,
implying they are rather simplistic, and later easy to be gradually
replaced.  For now I am not dealing with templates at all - the
Comments element lets you to stash a form which knows how to render
itself into HTML and can be inserted somewhere in the templates.
I've posted about it at my blog:
http://perlalchemy.blogspot.com/2009/06/catalystxcomments-rfc.html
(also have a look at the comment).  There is some code for it at:
http://github.com/gshank/ravlog/tree/8b7ec1493324212cde91927c15fc54cd2c9db25d/lib/CatalystX
(but now I've decided to change the name and add Elements - a play on
the chemical metaphor of Catalyst).


-- 
Zbigniew Lukasiak
http://brudnopis.blogspot.com/
http://perlalchemy.blogspot.com/

___
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] PLEASE HELP - Action attribute documentation confusing (Was: default : Local v. default : Path)

2009-07-07 Thread Tomas Doran

Paul Makepeace wrote:
FWIW, IMO, 
http://search.cpan.org/~hkclark/Catalyst-Manual-5.8000/lib/Catalyst/Manual/Intro.pod#Built-in_special_actions 
is a slightly odd place to be documenting in reference style the 
actions. Is there another place? This is one of those things I keep 
expecting has a home and then eventually finding back in the Manual's intro.


This also just came up in irc:

10:10  Altreus how about Catalyst::Manual::Actions, which exists
10:11  Altreus or at least a link from there to that so people who 
click on that looking for action types get a link


10:12  Veep tom: hmm. I just went through this... let me see... it 
felt like the tutorial started very basic and clear, and then these 
weird :Blah things starting showing up. Explaining each one as it shows

  up there might help.

So it's obviously not well enough documented/explain and confusing in 
both the regular Catalyst docs and the tutorial.


Does someone want to step up and get this sorted out? Newcomers 
preferred - you'll be better at working out what isn't covered, as you 
don't know it back to front.


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/


Re: [Catalyst] Parse errors: Tests out of sequence - any ideas?

2009-07-07 Thread Tomas Doran

kakim...@tpg.com.au wrote:

I tried searching on google but I just don't know what's causing this.
 Any ideas would be welcomed.


Something in your test is emitting something that looks like TAP, and so 
confusing the TAP parser..


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/


Re: [Catalyst] Polymorphism?

2009-07-07 Thread Tomas Doran

Dave Rolsky wrote:
As do Moose roles. I've found using roles in controllers incredibly 
helpful, since I often have similar/same process this data and invoke a 
-search method, where the only thing that varies is what is being 
searched and/or the way the results are being displayed.


Unfortunately, combining multiple roles with method attributes onto the 
same class totally fails right now.


So:

with $_ for qw/ControllerRole1 ControllerRole2/; # Works

with qw/ControllerRole1 ControllerRole2/; # Attributes fail to show up.

This means that conflict resolution (one of the nicest features of 
roles) fails to work :/


I have fixes for this in the pipeline; as always, volunteers welcome to 
take them off my hands and finish them off if you want this before I get 
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/


Re: [Catalyst] how to implement Transactions (over different db tables) in a Catalyst project

2009-07-07 Thread Tomas Doran

kakim...@tpg.com.au wrote:

 Sorry, after reading it again
after the many responses to this thread, I realised it's ok.


It's _NOT OK_, as you didn't get it first time. So it's obviously not 
clear *enough*.


Please supply the DBIC list with a doc patch to make it more clear and 
explicit.


Thanks
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/


Re: [Catalyst] Polymorphism?

2009-07-07 Thread Eric Wright
Thanks all for the thoughts and the link. I'll be sure to take some time and
digest that.

Re: method modifiers, that sounds like a really interesting solution. Roles
seem very similar to me to Java interfaces. I really need to get more on
board with understanding how Moose can best be utilized. I'm still very
green. Plus the proliferation of object frameworks in Perl can leave you
with analysis paralysis but things seem to be moving more that way in the
Perl community especially with Perl 6 (somewhere?) on the horizon.

I've got the new Apress Catalyst book on pre-order. Any other recommended
reading resources?

Cheers,
Eric

On Tue, Jul 7, 2009 at 5:48 AM, Tomas Doran bobtf...@bobtfish.net wrote:

 Dave Rolsky wrote:

 As do Moose roles. I've found using roles in controllers incredibly
 helpful, since I often have similar/same process this data and invoke a
 -search method, where the only thing that varies is what is being searched
 and/or the way the results are being displayed.


 Unfortunately, combining multiple roles with method attributes onto the
 same class totally fails right now.

 So:

 with $_ for qw/ControllerRole1 ControllerRole2/; # Works

 with qw/ControllerRole1 ControllerRole2/; # Attributes fail to show up.

 This means that conflict resolution (one of the nicest features of roles)
 fails to work :/

 I have fixes for this in the pipeline; as always, volunteers welcome to
 take them off my hands and finish them off if you want this before I get
 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/


[Catalyst] offset the URI of an existing Cat App

2009-07-07 Thread Ian Docherty

Hi
I have always written Cat Apps so they start at the '/' URI but now I 
have been asked to 'offset' one so that:-


/becomes /foo
/userbecomes /foo/user
/admin/1 becames /foo/admin/1

etc.

I saw the __PACKAGE__-config-{namespace} that could be used but this 
would still require an entry in each of my controllers. e.g.


package MyApp::Controller::Root;
...
__PACKAGE__-config-{namespace} = 'foo';
...


package MyApp::Controller::Admin;
...
__PACKAGE__-config-{namespace} = 'foo/admin';
...


etc. which strikes me as very unsatisfactory.

I think I must have missed something. Is there a single point where I 
can make a change that will replicate through all my controllers? Can 
anyone put me right?


Regards
Ian

___
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] Polymorphism?

2009-07-07 Thread J. Shirley
On Tue, Jul 7, 2009 at 6:11 AM, Eric Wright i...@rapidsynergy.com wrote:

 Thanks all for the thoughts and the link. I'll be sure to take some time
 and digest that.

 Re: method modifiers, that sounds like a really interesting solution. Roles
 seem very similar to me to Java interfaces. I really need to get more on
 board with understanding how Moose can best be utilized. I'm still very
 green. Plus the proliferation of object frameworks in Perl can leave you
 with analysis paralysis but things seem to be moving more that way in the
 Perl community especially with Perl 6 (somewhere?) on the horizon.

 I've got the new Apress Catalyst book on pre-order. Any other recommended
 reading resources?

 Cheers,
 Eric


I'm going to be very opinionated for a moment, so the TIMTOWDI crowd can
skip this message.

Don't bother with other object frameworks.  They really lack what makes
Moose special.  Moose is built on top of Class::MOP.  That's the meta-object
protocol which enables you to have a meta-layer and change the entire API
that Moose itself builds on.

This lets you do a tremendous amount of things with usually very little
code.  The learning curve is also not quite as steep as you would expect.

Here's an anecdote to prove my case ;)

The other day I wanted to update the behavior of an attribute.  Someone
pointed out attribute trait.  I looked it up in the cookbook, and I was
able to get exactly what I wanted by changing the definition of what that
attribute was.  By changing the definition of things, you can change what
the instances of those things are very easily.  Unfortunately my case was
thwarted by some other things, so it didn't work exactly as intended... but
it will :)

Unless you have experience with Lisp or the like, you're not going to
initially appreciate what Moose is.  You'll think of it as a heavy-weight
object API, but trust a random guy on the internet when he says it is worth
it.

The manual is an easy read and worth following, and here is a good
presentation on Moose as well (lacks a little oompf without hearing Dieter's
voice): http://weftsoar.net/~hdp/moose/

Regarding books, I'd say venture out to your local Perl Monger meetings and
talk to them and borrow some of their books.  That way you can sample it,
and find out the books that speak to you and then you can purchase those.

Thanks,
-J
___
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] offset the URI of an existing Cat App

2009-07-07 Thread Peter Karman

Ian Docherty wrote:

I think I must have missed something. Is there a single point where I 
can make a change that will replicate through all my controllers? Can 
anyone put me right?


this is done completely at the deployment config level. There's nothing 
to modify in your actual code.


How are you deploying the app? FastCGI? mod_perl? etc.

--
Peter Karman  .  http://peknet.com/  .  pe...@peknet.com
gpg key: 37D2 DAA6 3A13 D415 4295  3A69 448F E556 374A 34D9

___
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] offset the URI of an existing Cat App

2009-07-07 Thread Jim Spath

Octavian Râsnita wrote:

But if in the templates you use urls like:

a href=/user.../a

you need to change them to urls like:
a href=[% c.uri_for('/user') %].../a


There is an alternative to using uri_for in every link:

base href=[% c.request.base %]

...

a href=user/a

This method will work whether your deployment is at the base of the 
domain, or a subdirectory.


We used this method so that we could run applications under user 
directories:


http://dev.server.com/~someuser/app1/

But then on production have them run at the base of their domain.

http://app1.domain.com/

- Jim

___
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] offset the URI of an existing Cat App

2009-07-07 Thread Octavian Râsnita

From: Ian Docherty catal...@iandocherty.com

Hi
I have always written Cat Apps so they start at the '/' URI but now I have 
been asked to 'offset' one so that:-


/becomes /foo
/userbecomes /foo/user
/admin/1 becames /foo/admin/1


Hi,

If using mod_perl, instead of:

Location /
SetHandler perl-script
PerlResponseHandler MyApp
/Location

use:

Location /foo
SetHandler perl-script
PerlResponseHandler MyApp
/Location

And the application should work at the new location.

But if in the templates you use urls like:

a href=/user.../a

you need to change them to urls like:
a href=[% c.uri_for('/user') %].../a

If you use fastcgi, instead of:

FastCgiExternalServer /tmp/myapp.fcgi -socket /tmp/myapp.socket
Alias / /tmp/myapp.fcgi/

you could use:

FastCgiExternalServer /tmp/myapp.fcgi -socket /tmp/myapp.socket
Alias /foo /tmp/myapp.fcgi/

Note! I know these only from theory, because I always needed to use apps 
only at /.


HTH.

Octavian





etc.

I saw the __PACKAGE__-config-{namespace} that could be used but this 
would still require an entry in each of my controllers. e.g.


package MyApp::Controller::Root;
...
__PACKAGE__-config-{namespace} = 'foo';
...


package MyApp::Controller::Admin;
...
__PACKAGE__-config-{namespace} = 'foo/admin';
...


etc. which strikes me as very unsatisfactory.

I think I must have missed something. Is there a single point where I can 
make a change that will replicate through all my controllers? Can anyone 
put me right?


Regards
Ian

___
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] offset the URI of an existing Cat App

2009-07-07 Thread Octavian Râsnita

From: Jim Spath jsp...@pangeamedia.com
Octavian Râsnita wrote:

But if in the templates you use urls like:

a href=/user.../a

you need to change them to urls like:
a href=[% c.uri_for('/user') %].../a


There is an alternative to using uri_for in every link:

base href=[% c.request.base %]

...

a href=user/a

This method will work whether your deployment is at the base of the
domain, or a subdirectory.

Thanks for remembering about base. I think that this technique won't work 
if the links start with / though, like:


a href=/user/a

So, it is better to create the links using uri_for() from the beginning or 
use only relative links...


Octavian




___
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] offset the URI of an existing Cat App

2009-07-07 Thread Ian Docherty

Octavian Râsnita wrote:

From: Ian Docherty catal...@iandocherty.com

Hi
I have always written Cat Apps so they start at the '/' URI but now I 
have been asked to 'offset' one so that:-


/becomes /foo
/userbecomes /foo/user
/admin/1 becames /foo/admin/1


Hi,

If using mod_perl, instead of:

Location /
SetHandler perl-script
PerlResponseHandler MyApp
/Location

use:

Location /foo
SetHandler perl-script
PerlResponseHandler MyApp
/Location

And the application should work at the new location.


Thanks, that did the trick. I was looking for something more complicated!


But if in the templates you use urls like:

a href=/user.../a

you need to change them to urls like:
a href=[% c.uri_for('/user') %].../a

If you use fastcgi, instead of:

FastCgiExternalServer /tmp/myapp.fcgi -socket /tmp/myapp.socket
Alias / /tmp/myapp.fcgi/

you could use:

FastCgiExternalServer /tmp/myapp.fcgi -socket /tmp/myapp.socket
Alias /foo /tmp/myapp.fcgi/

Note! I know these only from theory, because I always needed to use apps 
only at /.


HTH.

Octavian





etc.

I saw the __PACKAGE__-config-{namespace} that could be used but this 
would still require an entry in each of my controllers. e.g.


package MyApp::Controller::Root;
...
__PACKAGE__-config-{namespace} = 'foo';
...


package MyApp::Controller::Admin;
...
__PACKAGE__-config-{namespace} = 'foo/admin';
...


etc. which strikes me as very unsatisfactory.

I think I must have missed something. Is there a single point where I 
can make a change that will replicate through all my controllers? Can 
anyone put me right?


Regards
Ian

___
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] offset the URI of an existing Cat App

2009-07-07 Thread Larry Leszczynski
Hi Ian -

 I have always written Cat Apps so they start at the '/' URI but now I 
 have been asked to 'offset' one so that:-
 
 /becomes /foo
 /userbecomes /foo/user
 /admin/1 becames /foo/admin/1

One approach is to modify $c-prepare_path, similar to:

   http://dev.catalyst.perl.org/wiki/wikicookbook/urlpathprefixing

(The example was written for Catalyst 5.7 and will work with 5.8, but
there's probably a Moose-ier way to do the same in 5.8...)

Something like:

--

package MyApp;

use Catalyst::Runtime '5.70';
use base 'Catalyst';

__PACKAGE__-setup();

sub prepare_path
{
my $c = shift;
$c-NEXT::prepare_path(@_);

my @path_chunks = split m[/], $c-request-path, -1;

# Pull prefix off beginning of request path:
my $prefix = shift @path_chunks;

# Create modified request path from any remaining path chunks:
my $new_path = join('/', @path_chunks) || '/';
$c-request-path($new_path);

# Modify the path part of the request base
# to include the path prefix:
my $base = $c-request-base;
$base-path($base-path . $prefix/);

return;
}

--

So if the url was /foo/admin/1, the controllers will see a request for
/admin/1.  Also, $c-uri_for('some/path') will generate
/foo/some/path.



HTH,
Larry

___
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] Integrating with ASP.NET sessions and authentication

2009-07-07 Thread Alejandro Imass
Going out on a limb here but it's probable that the .NET apps are
authenticating to an Active Directory or Primary Domain Controller, a
Windoze domain in any case. They should offer the LDAP protocol and
you could use that for authentication.

Session management will occur at your Catalyst Server depending on the
Session handling mechanism used (derivatives of
Catalyst::Plugin::Session::Store). If you are using your database with
Catalyst::Plugin::Session::Store::DBIC (or Session::Store::DBI) you
may be able to share sessions with their .NET apps, if of course, you
are both able to store the session in a common database (unlikely).

In any case, you need to figure out how the ASP.NET apps are keeping
their sessions. Speculating, it is unlikely that the session info will
be compatible with the 2 platforms, especially on any extra-data that
apps may store in the sessions, because of the different serialization
schemes that may be used.

If you are using PostgreSql on your Catalyst Apps you may do some
magic with something like DBI Link which could help you integrate the
ASP.NET session handling mechanism  to a pgsql table and handle your
sessions directly from you Pg database with DBIC. Another option would
be to have some ASP.NET expert to write up the sync mechanism to a DB
table accessible by your Catalyst apps. A one-way session sync should
not be that hard, for example, from .NET to the DB where your Cat Apps
are running. The first step is finding out how the ASP.NET apps are
keeping their sessions. Maybe write your own
Catalyst::Plugin::Session::Store and have it work directly with the
.NET stuff ?

On Tue, Jul 7, 2009 at 12:59 PM, Robert Mahr...@pobox.com wrote:
 I was wondering if anyone has integrated a Catalyst application with
 ASP.NET session and authentication (for single sign-on if possible).
 My company recently go acquired and we've been told to integrate our
 systems with theirs (ASP.NET).  I know next to nothing about how .NET
 works and was hoping someone had already done the heavy lifting for me
 :-).

 Cheers,
 Rob

 ___
 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/


[Catalyst] Catalyst crashing hard with UTF-8 string

2009-07-07 Thread Paul Makepeace
I'm uploading utf-8 news feed data through a web form, processing it
and reporting back to the user errors that are encountered during a
news feed parse. In those error reports I'm including snippets of the
input data via TT,

  [% IF telluser.error %]
  p class = error
[% FOREACH error_msg = telluser.error %]
  [% TRY %]
[% error_msg %]
  [% CATCH %]
Error printing message
  [% END%]
  br /
[% END %]
  /p
  [% END %]


It turns out that if a UTF-8 string is in error_msg the backend
request completely dies (I get a Proxy Error Reason: Error reading
from remote server), even with use Catalyst /-Debug/ and that [% TRY
%] block. I know it's UTF-8 because Encode::is_utf8 says so, and warn
$string is showing up in the terminal correctly. The string contains
a right single quote (E2 80 99): If I do [% error_msg | html_entities
%] it is successfully converted to rsquo;. Altho unfortunately so are
the HTML tags...

Something's definitely changed wrt to UTF-8 behavior since we did our
big upgrade from Catalyst 5.7. Are there any 'known gotchas' I could
check?

At this point my debugging fu runs out--help appreciated on where to look next.

Paul

___
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/