On Thu, Mar 6, 2008 at 7:36 PM, Emily Heureux [EMAIL PROTECTED] wrote:
Hi, I have a variable in a Controller method sent to the stash for a
particular tt file. What if I want that same variable to be available to
another tt file? I assume I cannot set two templates in one method.
yeah you
On Tue, Mar 18, 2008 at 4:40 PM, Ian Sillitoe [EMAIL PROTECTED] wrote:
sub get_custom_resultset {
my ($from, $to) = @_;
my $result_source_name = ResultSetFrom${from}To${to};
my $result_source;
# check if we haven't already made this
if ( grep { $reps_source_name eq $_ }
On Wed, Jun 11, 2008 at 4:54 PM, Matt S Trout [EMAIL PROTECTED] wrote:
(1) http://www.browsing.co.uk/cat
The color scheme works well, I'm particularly fond of the red and grey
combination, and I'd get rid of the colourful lines above the content
columns. I dislike the ingredients image with the
On Fri, Jul 25, 2008 at 1:12 AM, James S. White [EMAIL PROTECTED] wrote:
I'm passing an argument to the method via a post, and then catch it with
my ( $self, $c, $myarg ) = @_; shouldn't there be a way to mine it without
using [% c.req.arguments.0 %] in the template?
like [%
On Sat, Oct 4, 2008 at 9:31 AM, Peter Karman [EMAIL PROTECTED] wrote:
You don't need a real plugin unless you need to override the dispatch process.
But I often put convenience methods in my MyApp.pm base class. So implement
your
idea #1 and then add:
package MyApp;
sub logdb {
my $c
On Sun, Oct 5, 2008 at 2:03 PM, Dr. Jennifer Nussbaum
[EMAIL PROTECTED] wrote:
So ive got these two model classes, one i call with
$c-model('MyAppDB::Book') and the other with $c-model('Book'). The problem
is, i have some things that are Cat specific and i dont want them in my
schema class
by this script?
Perhaps a better method exists for this sort of thing?
See DBIx::Class::Schema::Loader, particularly, the make_schema_at()
function and the constraint and exclude options.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp
and call $app-NEXT::setup_actions
before everything else
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http
and id_field username).
What am I doing wrong?
$c-check_user_roles expects a user object not a username string (how
would it distinguish a user name from a role name?). You can get a
user object via $c-find_user.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code
you need to feed it a blessed scalar,
namely, *an object*.
i think you can give a string ... you must load the user into a user-object
fit for the Authorization::Roles
Not if you want it to DTRT.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkey
/tcXHEoyXXwHvcI5RppiTmCiHg4g
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://edenc.vox.com/http://www.shadowcat.co.uk
148 tables, that's
probably what's hitting you. Just declare all your loadable classes
manually and you'll probably shave off most of load time.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst
::View::HTML'), which
found 'myApp::View::HTML=HASH(0x8ef7b50)'. Relying on regexp fallback
You're not using the API correctly, your call should be $c-view('HTML')
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp
On Sat, Mar 14, 2009 at 10:49 AM, kakim...@tpg.com.au wrote:
Any idea or documentation that I could read up to find out on how to
configure a default view?
$c-view is documented in perldoc Catalyst
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkey
?
This is an unmaintained oversimplification of how Reaction works. I
put the example up as proof-of-concept code. I believe castaway has
gone a bit further and integrated this into a production app.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkey
-{'Plugin::ConfigLoader'}{config_local_suffix} = hostname();
that way, you can set up your app-wide config in myapp.conf and the
host specific config in myapp_hostname.conf
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp
)-result_source-storage-sqlt_type
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://edenc.vox.com/http
as View::SVG sets $c-res-body
sub graph : Chained('content') Args(0) {
my($self, $c) = @_;
$c-forward('View::SVG'); # sets res-body, res-content_type, etc.
}
sub whatever : Chained('content') Args(0) { #etc... }
# insert jshirley's end action here
what's missing?
--
Eden Cardim
On Tue, Aug 11, 2009 at 8:11 PM, J. Shirleyjshir...@gmail.com wrote:
The fact that Chained doesn't render template from PathPart, but from the
action name? :)
It would be content/html.tt -- not content/as/html.tt
not really:
# insert jshirley's end action here
--
Eden Cardim Need
. This is why, theoretically, views
are supposed to be dispatch-agnostic and it's specifically the
controller's job to tell the view how to render data.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst
@lists.scsys.co.uk/msg01413.html
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://edenc.vox.com/http
;
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://edenc.vox.com/http://www.shadowcat.co.uk/servers
a you a step closer to creating a god
object.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://edenc.vox.com
for use by any application, not
just cat, and the plugin should just hook that module into Catalyst.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development
writes, if you need a controller
Andrew base class, write a controller base class and inherit from
Andrew that.
Or even better, write a role instead.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk
anyway, not just because of the time-out, but other
things like security and manageability come into play. The typical way
to get this done is to implement a job queue.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp
other class.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://edenc.vox.com/http://www.shadowcat.co.uk
as dependencies, but it's a good start for a
production-worthy Makefile.PL
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform
between them in specific deploys.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://edenc.vox.com/http
Where can I add the ACL attributes for edit_new?
Try MooseX::Role::Parameterized
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment
it's being displayed like this:
Kiffin 2010-01-05T20:35:14
Kiffin How can I get that 'T' out of there, replacing it with the
Kiffin usual space?
-last_modified-strftime('%F %T')
See perldoc DateTime for more formatting options.
--
Eden Cardim Need help with your Catalyst
($self, $c, $prefix, $username) = @_;
$c-user-check_prefix($prefix) or $c-detach('/error_404');
}
Also, make sure you store the old prefixes and redirect to the new ones
adequately as to not break the web.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkey
further information about how you're running the application
before telling you what to do.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development
where DBIx::Class is used solely as a query
library and they all perform very well and were set up quite quickly,
because I didn't have to spend time designing, building and testing an
access layer.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkey
a shrink, trolling won't help you or anyone else.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://blog.edencardim.com
Rob == Rob Hoelz rho...@inoc.com writes:
Rob This way, applications requiring a custom load order can
Rob override determine_component_load_order if they which, and
Rob plugins can override it to provide cool features like
Rob dependency resolution.
Rob Thoughts?
Load order
Stuart by fallback to an error page.
[snip]
Stuart I could just be missing some documentation: maybe this
Stuart is covered but I haven't been able to find it.
Have you read Catalyst::Manual::Cookbook?
--
Eden Cardim Need help with your Catalyst or DBIx::Class project
= { PathPart = 'log-in } } );
note that you can use any key that you would use as an action attribute,
including chainining, and catalyst automatically promotes the method to
an action due to the existence of the config.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project
::Schema::Versioned, it's designed
specifically for managing changes in your schema.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment
by using hash slices
instead.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://blog.edencardim.com/http
memory.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://blog.edencardim.com/http://www.shadowcat.co.uk
on the
authentication API inside the controller code, which for most cases
won't work at all in a non-web environment. You'd have to mimic the
entire environment, which is a lot more trouble than just factoring your
code correctly.
--
Eden Cardim Need help with your Catalyst or DBIx::Class
}
David }
David Any comments on that solution are appreciated as are pointers
David to alternatives.
Put the ajax code into a separate controller with an XHR-specific end
action (probably empty, for your case) and chain from there.
--
Eden CardimNeed help with your
($self, $c) = @_:
$c-stash-{template} = 'error_404.tt'
}
in Controller::Artist::XHR:
sub error_404 :Action {
my($self, $c) = @_;
$self-status_not_found($c,
message = 'Cannot find what you were looking for!'
);
}
--
Eden CardimNeed help with your perl Catalyst or DBIx
Octavian == Octavian Rasnita orasn...@gmail.com writes:
Octavian Can I find more information about the :Action dispatch type?
Octavian Is it just a replacement for :Private? Or it is something
different?
Yes, it's effectively a replacement for :Private.
--
Eden Cardim
the check for the
'bar_level_users' role before running do_something_else.
--
Eden CardimNeed help with your perl Catalyst or DBIx::Class
project?
Software Engineer http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd.Want a managed development
post.
--
Eden CardimNeed help with your perl Catalyst or DBIx::Class
project?
Software Engineer http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd.Want a managed development or deployment
platform?
http://blog.edencardim.com http
around the app then locate and edit the related
code in auto.
--
Eden CardimNeed help with your perl Catalyst or DBIx::Class
project?
Software Engineer http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd.Want a managed development or deployment
been wanting to write a module with that logic for some time now,
but I always find myself lacking the tuits.
--
Eden CardimNeed help with your perl Catalyst or DBIx::Class
project?
Software Engineer http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd
that will allow easy
expression of those types of constructs.
You'll have to declare something like:
sub my :Chained('base') CaptureArgs(0) {
my($self, $c) = @_;
$c-forward(user = [$c-user-id]);
}
and then chain onto that.
--
Eden CardimNeed help with your perl Catalyst or DBIx
just dodge
the HTML::FormHandler thing altogether, but that's just me, YMMV.
--
Eden CardimNeed help with your perl Catalyst or DBIx::Class
project?
Software Engineer http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd.Want a managed development
need to set it before the storage object is constructed, namely,
it should work if you place it before the call to MyApp-setup
--
Eden CardimNeed help with your perl Catalyst or DBIx::Class
project?
Software Engineer http://www.shadowcat.co.uk/catalyst
a
Catalyst::Model, see the catalyst manual for that: http://goo.gl/Adudh
--
Eden CardimNeed help with your perl Catalyst or DBIx::Class
project?
Software Engineer http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd.Want a managed development
specifics you're going to have to show your catalyst
code.
--
Eden CardimNeed help with your perl Catalyst or DBIx::Class
project?
Software Engineer http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd.Want a managed development or deployment
platform
(), it propagates
everywhere else as well. Plus, you reuse the page/csv implementation
easily. The combination of chained DBIC resultsets and catalyst chains
is very similar to curried functions (I believe that's what the initial
design goal was).
--
Eden Cardim
Software Engineer
Shadowcat Systems Ltd
about it; we can
fREW possibly get you hooked up
Were the previous commit bits preserved?
--
Eden Cardim
Software Engineer
Shadowcat Systems Ltd.
http://www.shadowcat.co.uk
http://blog.edencardim.com
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http
. If the redirection isn't happening, your JS client
isn't respecting the header. So yes, you need to write code on the
client-side that does the redirection for you.
--
Eden Cardim
Software Engineer
Shadowcat Systems Ltd.
http://www.shadowcat.co.uk
http://blog.edencardim.com
it must be able to uniquely identified each row with
Francisco a Primary Key.
This is orthogonal to the fact that you're using DBIC inside Catalyst,
it actually depends on the data model you've implemented.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkey
mentioned what the expected behaviour is and what you're getting
instead of that.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment
and it's very
satisfying.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://blog.edencardim.com/http
-get_session_cookie-expires($ttl) if $remember_user;
--8---cut here---end---8---
Should do the trick.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd
';
package MyApp::Model::Foo;
has bar = (is = 'ro');
--8---cut here---end---8---
The above should set the bar attribute during load time for you straight
out of the box.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkey
('/help', c.req.path) %]/Help/a
--8---cut here---end---8---
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development
on a headless web server or
recovering your screwed X session). If you need an editor that favors
mice and GUIs, try Padre.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want
works that way, try:
Model::RSVP
dsn 'DBI:Pg:dbname=rsvp;host=joomla.brain.buz',
user joomla
password 007drupal
Model
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat
.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://blog.edencardim.com/http://www.shadowcat.co.uk/servers/
http
Eric == Eric Wright ewri...@linescale.com writes:
Eric I'm using Catalyst::Model::DBIC::Schema. Is there a preferred
Eric way to hook into the result set to customize things the way I
Eric need?
http://beta.metacpan.org/module/Catalyst::Model::DBIC::Schema#traits
--
Eden Cardim
into a model and use
delegation.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://blog.edencardim.com/http
work, assuming the CountSheep() method is in place.
--
Eden Cardim
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http://blog.edencardim.com/http://www.shadowcat.co.uk/servers/
http
that Catalyst has moved to being 100% plack compliant, you can
integrate that effortlessly via Plack::Middleware::HTMLMinify
--
Eden Cardim
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development or deployment platform?
http
to approach this both in ResultSets
will and in FormHandler forms?
You might want to look at
Catalyst::TraitFor::Model::DBIC::Schema::WithCurrentUser
--
Eden Cardim
Code Monkeyhttp://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd. Want a managed development
, when the
Louis webserver doesn't set the WD as expected?
I'm not exactly sure about the specific motivation for that change, but
script/myapp_fastcgi.pl is just a perl source like any other, adjust @INC
before running it (via PERL5LIB, -I, etc.) and you'll be fine.
--
Eden Cardim
, but bringing it into developers face might be
Adam motivating... And the database query integration looks nice.
See Plack::Middleware::Debug and it's plugins. Specifically,
Plack::Middleware::Debug::CatalystLog, Plack::Middleware::Debug::DBITrace and
Plack::Middleware::Debug::DBIProfile
-- Eden
or even
Louis $basename/../lib wouldn't be appropriate there.
Yes, but there's only so much that can be automated.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkey http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd
controller?
use Plack::Middleware::ForceEnv, this and other upgrade caveats are documented
in Catalyst::Upgrading
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkey http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd.Want
, you should get a list of loaded components, please show us
that list.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkey http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd.Want a managed development or deployment
| dbms::Model::ORANGES::AccountView | class|
Kenneth Strange, I do not see it listed, yet it got created and works
Kenneth when I call the /index.
You probably want $c-model('ORANGES::AccountView');
--
Eden Cardim Need help with your
memory.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkey http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd.Want a managed development or deployment platform?
http://edencardim.comhttp://www.shadowcat.co.uk
be applying a
Plack::Middleware to your .psgi instead.
--
Eden Cardim Need help with your Catalyst or DBIx::Class project?
Code Monkey http://www.shadowcat.co.uk/catalyst/
Shadowcat Systems Ltd.Want a managed development or deployment platform?
http://edencardim.com
::Schema, you don't need to wait
for MySQL to come up, as it does lazy connecting. If someone issues a request
during the mysql startup time, they'll get a 500 error, which you can handle
via an error document and is much better than a plain 404.
--
Eden Cardim Need help with your
appropriately, I've been planning to submit a
patch for this, but haven't found the time.
--
Eden Cardim
+55 11 9644 8225
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail
of the app
Bill home.
You still need a place for the config to live when you install the app.
--
Eden Cardim
+55 11 9644 8225
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http
http://www.mdk.me.uk/community/mocks/Catalyst.jpg
I love it!
--
Eden Cardim
ShadowCat Systems Ltd.
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com
"Andrew" writes:
> Is there a keep it simple stupid answer to the following question:
>
> Put a subroutine in a separate place, where it can be accessed / called, by
> whatever controllers need to use it?
Create MyApp::Model::Whatever then
On Wed, Mar 8, 2017 at 6:15 PM, Robert Brown wrote:
> Hi Jen,
>
> You can use MyApp::Schema outside of Catalyst:
>
> my $schema = MyApp::Schema->connect( $ENV{ LIVE } ? 'live' : 'dev' );
>
> (I'm additionally using DBIx::Class::Schema::Config to be able to connect
> to
85 matches
Mail list logo