Grokbase
x

Fernan Aguero (f...@iib.unsam.edu.ar)

Profile | Posts (47)

User Information

Display Name:Fernan Aguero
Partial Email Address:f...@iib.unsam.edu.ar
Posts:
47 total
1 in Catalyst Framework Development
21 in Catalyst Framework
19 in DBIx::Class
8 in PostgreSQL - General

5 Most Recent

All Posts
1) Fernan Aguero Re: [Catalyst] printing the generated SQL
| +1 vote
| From: "Paul Rudolf Seebacher" <paul.seebacher@gmx.net> | And where should I enter this command...
Catalyst Framework
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
| From: "Paul Rudolf Seebacher" <paul.seebacher@gmx.net>
|
>> Octavian Rasnita wrote:
>>> Hi,
>>>
>>> Is it possible to log a certain SQL which is generated in a Catalyst
>>> application by a controller that uses a DBIx::Class model?
>>>
>>> Thank you.
>>>
>>> Octavian
>>>

>> This will print out geneerated SQL on debug screen:
>> $ export DBIC_TRACE=1
  
| And where should I enter this command line?
|
| I don't need it for a program that uses DBIx::Class which is ran from the
| command line, but in a Catalyst app.

[rest snipped]

In your shell:

# bash
$ export DBIC_TRACE=1

or

# csh
$ setenv DBIC_TRACE 1


and then start the catalyst builtin test server like this
$ ./script/myapp_server.pl

or do all at once, like this
$ DBIC_TRACE=1 ./script/myapp_server.pl

Then point your browser to http://localhost:3000, use your
app and see the SQL queries being written to your terminal.

Same thing for non-catalyst scripts that use DBIC:
$ DBIC_TRACE=1 ./myscript.pl

HTH,

Fernan


_______________________________________________
List: [email protected: Cat...@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/
2) Fernan Aguero Re: [Catalyst] (en) error screen translations
| +1 vote
| Needs a Spanish translation. (es) Por favor, vuelva más tarde....
Catalyst Framework
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
| Jonathan Rockway wrote:
>> Here's the list:
>> (en) Please come back later
>> (fr) SVP veuillez revenir plus tard
>> (de) Bitte versuchen sie es spaeter nocheinmal
>> (at) Konnten's bitt'schoen spaeter nochmal reinschauen
>> (no) Vennligst prov igjen senere
>> (dk) Venligst prov igen senere
>> (pl) Prosze sprobowac pozniej
>> (pt) Por favor, volte mais tarde
>> (ja) ??????????????????????????????
>> (el) ?????????????????????? ?????????????????? ????????????????.
>> (ro) V?? rug??m s?? reveni??i mai târziu.
>> (he) ?????? ???????? ?????????? ?????????? ????????
>> (cn) ???????????????
>> (lb) Kommt w.e.g. spéider nach eng Kéier zeréck.
>> (bg) ????????, ???????????????? ???????? ??????????
>> (bø) børk børk børk!
>> Anything else? The thought has occurred to me that we should order
>> these by popularity.
|

| Needs a Spanish translation.
|

(es) Por favor, vuelva más tarde.

_______________________________________________
List: [email protected: Cat...@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/
3) Fernan Aguero Re: [Catalyst] CMS
| +1 vote
| > For while I've been thinking it would be nice to have a Cat-based CMS with | > multiple...
Catalyst Framework
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
| On 8/23/07, John Wang <johncwang@gmail.com> wrote:
| > For while I've been thinking it would be nice to have a Cat-based CMS with
| > multiple features built on top of a platform. The platform can include basic
| > things like Authn, Authz, Sessions, a basic user schema and pre-built HTML.
| > The pre-built HTML can include controllers/templates/etc for registration,
| > login/logout, openid, etc. Then on top of the platform you can have
| > plug-and-play features like forums, blogs, photo galleries, surveys etc. If
| > it was built the right way, you could have your choice of forums, etc. You
| > can also only load the features that you want. I'm not sure how easy this
| > would be to do but I think it would be neat.
|
| This is precisely what I DON'T want.  I want something manages and
| version my templates and then a view that lets Cat retrieve the
| appropriate template through some means.
|
| Not that what you describe wouldn't be nice to have, just not for me atm. ;)

don't know if this is what you were talking, but me, I'd
like a pluggable combo that will allow me to add simple
editing of pages (a small wiki or blog-like combo to plug
into any catalyst app), with choice of markup (Markdown,
Textile, WikiFormat) ... then my templating system should just
inject the processed content into a template.

Fernan


_______________________________________________
List: [email protected: Cat...@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/
4) Fernan Aguero Re: [Catalyst] Multi Mod_Perl apps
| +1 vote
| Hi, | Sorry if I post an old question, I just want to know if I could do this to run multi app on...
Catalyst Framework
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
| Hi,
| Sorry if I post an old question, I just want to know if I could do this to run multi app on the same server under mod_perl:
|  
|  
|     PerlSwitches -I/var/www/MyApp1/lib
|     PerlModule MyApp1
|     
|     <Location />
|         SetHandler          modperl
|         PerlResponseHandler MyApp1
|     </Location>
|
|     PerlSwitches -I/var/www/MyApp2/lib
|     PerlModule MyApp2
|     
|     <Location />
|         SetHandler          modperl
|         PerlResponseHandler MyApp2
|     </Location>
|
|  ------------
|  
|  My question is the PerlSwitches, will it get any error with that?
|  

I vaguely remember having tried this and failed. Basically
you're setting PerlSwitches to two different values in the
same conf ... probably only the last declaration will stand.

The other problem is that you're setting different
PerlResponseHandlers for the same Location ...

Maybe you can have what you want by running three apache
servers on the same box?


1) a light apache (only minimal) running mod_proxy,
listening on port 80 and redirecting /myapp1 to localhost:81
and /myapp2 to localhost:82

ProxyPass           /myapp1   http://localhost:81/myapp1
ProxyPassReverse    /myapp1   http://localhost:81/myapp1

or just

ProxyPass           /myapp1   http://localhost:81
ProxyPassReverse    /myapp1   http://localhost:81

depending on how you configure your apache listening on :81


2) a mod_perl apache listening on port 81

PerlSwitches -I/var/www/MyApp1/lib
PerlModule MyApp1

<Location />
 SetHandler          modperl
PerlResponseHandler MyApp1
</Location>


3) a mod_perl apache listening on port 82

PerlSwitches -I/var/www/MyApp2/lib
PerlModule MyApp2

<Location />
 SetHandler          modperl
PerlResponseHandler MyApp2
</Location>

[These are just schematic examples to give you the big idea,
I'm running a similar setup with 1 proxy redirecting to 1
modperl (catalyst) + 1 modpython (trac/svn) and it works
fine. I haven't tried to run two catalyst apps (your case),
but it should work fine.]

Good luck,

Fernan
app

_______________________________________________
List: [email protected: Cat...@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/
5) Fernan Aguero Re: [Catalyst] overload/override sub? (Session::PerUser)
| +1 vote
| > Hi, | > I'd like to overload (or would it be override?) the | > merge_session_to_user sub in |...
Catalyst Framework
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
| Fernan Aguero wrote:
| > Hi,
| >
| > I'd like to overload (or would it be override?) the
| > merge_session_to_user sub in
| > Catalyst::Plugin::Session::PerUser to be able to guide the
| > hash merge (i.e. create new hash value keys for conflicting
| > keys).
| >
| > Now, where and how should I do the overriding? Excuse my ignorance
| > ... but I've never done this and searching for 'Perl
| > overload' always gets me to instructions on how to overload
| > built-in operators ...
| >
| > Thanks in advance,
| >
| > Fernan
|
| Redefine is the term in perl-lingua.

Thanks for the clarification ...

| In MyApp.pm:
|
| {
|   no warnings 'redefine';
|
|   sub merge_session_to_user {
|     # your new sub
|
|     # ...
|
|     # To call the previous implementation if you should want it:
|     # $self->NEXT::merge_session_to_user(@args);
|   }
| }
|
| The key thing to remember here is that all Cat plugins 'pollute' the $c
| namespace, which isa Myapp.
|
| HTH
| Ash

and thanks for the code example.

I have already redefine the sub and it's working!

Thanks again,

Fernan

_______________________________________________
List: [email protected: Cat...@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/

spacer
Profile | Posts (47)
Home > People > Fernan Aguero