Re: [Catalyst] does anybody know how to install catalyst over dreamhost shell account

2011-10-11 Thread Brian Cassidy
On Tue, Oct 11, 2011 at 9:05 PM, ebhakt ebh...@gmail.com wrote:
 Hi!!.
 I am trying to install catalyst over a dreamhost shell account

Perhaps the dreamhost wiki could be of service? Specifically this:

http://wiki.dreamhost.com/Catalyst#Configure_a_custom_CPAN_user_environment

Cheers,

-- 
Brian Cassidy (brian.cass...@gmail.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/


Re: [Catalyst] Compress HTML

2011-09-08 Thread Brian Cassidy
On Thu, Sep 8, 2011 at 11:20 AM, Stefan catal...@s.profanter.me wrote:
 Hi,

 is there a module or a plugin to compress the html code?

I've used HTML::Packer [1] with good results. It will also do CSS/JS
minification via CSS::Packer and JavaScript::Packer if you need that
as well.

[1] https://metacpan.org/module/HTML::Packer

-- 
Brian Cassidy (brian.cass...@gmail.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/


Re: [Catalyst] Base URI breakdown

2009-03-06 Thread Brian Cassidy
On Fri, Mar 6, 2009 at 11:02 PM, Trevor Phillips
trevor.phill...@gmail.com wrote:
 In a Catalyst app, I need to break down the base request URL to
 extract hostname, port, etc separately.

Could you not use $c-req-uri [1]?

-Brian

[1] 
http://search.cpan.org/dist/Catalyst-Runtime/lib/Catalyst/Request.pm#$req-%3Euri

___
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] Numerous Authorization queries

2008-11-13 Thread Brian Cassidy
On Thu, Nov 13, 2008 at 7:09 AM, Stuart Dodds [EMAIL PROTECTED] wrote:
 That means every iteration the check_user_roles() sub is being called to
 display the link and hence the db is being hit every time.

 First of all is this behavior supposed to happen?

Yes, this is the intended behaviour. The data isn't cached in any
way. What I've done to circumvent that is to load all of the roles as
a hashref in $c-stash-{ user_roles } in my auto sub, and just
consult that stash data whenever i need to check roles.

if ( $c-user_exists ) {
$c-stash-{ user_roles }
   = { map { $_ = 1 } $c-user-roles };
}

So i can do:

[% IF user_roles.editor %]
...
[% END %]

-Brian

___
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] Numerous Authorization queries

2008-11-13 Thread Brian Cassidy
On Thu, Nov 13, 2008 at 1:59 PM, Jason Kuri [EMAIL PROTECTED] wrote:
 Brian, is this really true?

 Using the DBIx::Class store?

Things may have changed -- my work-around is quite dated now. It's
worth an investigation.

-Brian

___
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] Model config not being loaded

2008-10-14 Thread Brian Cassidy
On Tue, Oct 14, 2008 at 7:40 AM, dfx [EMAIL PROTECTED] wrote:
 This works fine on my local development machine, but doesn't work on the
 deployment server. The software versions are slightly older on the server
 (Catalyst 5.7006 on Perl 5.8.8, as opposed to Catalyst 5.7014 on Perl 5.10).
 I'm looking for hints as to what could be wrong or how I could work around
 this problem...

Is Config::General installed on the server?

-Brian

___
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] Documentation for Catalyst::Model::DBIC

2008-08-21 Thread Brian Cassidy
On Tue, Aug 19, 2008 at 6:10 AM, Terence Monteiro
[EMAIL PROTECTED] wrote:
 I could not find any documentation about how to supply a model's
 configuration parameters in the YAML in Catalyst::Model, since this is
 generic to all models. I finally found documentation in
 Catalyst::Model::Adaptor for this, and applied it:

 Model::DBIC:
schema_class: 'MyApp::Schema::FileDB'
connect_info:
- 'dbi:Pg:dbname=myapp'
- 'postgres'
- ''
- AutoCommit: 1

 Can I edit the pod for Catalyst::Model::DBIC::Schema with this example
 and/or Catalyst::Model and send it to the author/documenter?

Loading YAML config files is a function of
Catalyst::Plugin::ConfigLoader. There's a cookbook entry on this very
subject.

-Brian

[1] 
http://search.cpan.org/dist/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader/Manual.pod#Configuring_a_Catalyst::Model::DBIC::Schema_model_from_a_YAML_config

___
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] ConfigLoader patch: pretty syntax for plugins

2008-08-04 Thread Brian Cassidy
On Mon, Aug 4, 2008 at 8:51 PM, Dagfinn Ilmari Mannsåker
[EMAIL PROTECTED] wrote:
 I noticed that ConfigLoader's pretty syntax¹ (particluarly with
 Config::General) for model, view and controller config didn't extend to
 plugin config.


 Here's a patch that extends the feature to cover plugins:

Applied as svn revision 8177. Thanks.

-Brian

___
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] Checking out sources with svk?

2008-08-02 Thread Brian Cassidy
On Sat, Aug 2, 2008 at 10:05 AM, Dr. Jennifer Nussbaum
[EMAIL PROTECTED] wrote:
 Hi,

 Im trying to check out the Catalyst sources using svk on a Debian system. The 
 wiki says that the sources are at 
 http://dev.catalystframework.org/svnweb/Catalyst so i took the svk advice 
 from the Advent Calender to try to do this:

The root of the repository is at http://dev.catalyst.perl.org/repos/Catalyst/

-Brian

___
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] Configuring a Controller from the config file

2008-07-30 Thread Brian Cassidy
On Wed, Jul 30, 2008 at 8:38 AM, Moritz Onken [EMAIL PROTECTED] wrote:
 ---
 name: MyApp

 Controller::Root:
  key: value

 I had no luck. $c-config shows the hole config. I could access the config
 options via
 $c-config-{Controller::Root} but shouldn't it avaiable via $self-config?

You should use either $self-{key} or do the following:

__PACKAGE__-mk_accessors( 'key );

and then you can use $self-key to get that information.

-Brian

___
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] Re: [IMPORTANT] TEST Catalyst::Runtime 5.7100 RC1 (aka 5.7099_02)

2008-07-18 Thread Brian Cassidy
On Thu, Jul 17, 2008 at 4:54 PM, Brian Cassidy [EMAIL PROTECTED] wrote:
 NB: It is IMPERATIVE that you TEST this release against YOUR code. Quoth
 mst: If you do not test now any bugs we ship with are your fault! --
 so, there you have it :)

Thanks to a number of testers, we've checked in a few changes dealing
with regexp fallback and ACCEPT_CONTEXT from component().

The changelog reads:

- Fix regressions for regexp fallback in model(), view() and
controller()
- Added the supplied argument to the regexp fallback warning for easier
  debugging
- Ensure ACCEPT_CONTEXT is called for results from component()

If you're having issues, please check out 5.70/trunk [1] and try again.

-Brian

[1] http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/5.70/trunk/

___
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] [IMPORTANT] TEST Catalyst::Runtime 5.7100 RC1 (aka 5.7099_02)

2008-07-17 Thread Brian Cassidy
Hey All,

We're putting out one final development release before we go full bore
with 5.7100.

NB: It is IMPERATIVE that you TEST this release against YOUR code. Quoth
mst: If you do not test now any bugs we ship with are your fault! --
so, there you have it :)

Also, we've reworked the authors list to be much like DBIx::Class; in
one spot (Catalyst.pm) with each person's IRC nick, name, and email. In
you can fill in any of the blanks, fire off an email or catch us in
#catalyst-dev and well gladly fix it up.

Whilst the release is making its way to CPAN, you can grab it from here:

http://dev.thefeed.no/stuff/Catalyst-Runtime-5.7099_02.tar.gz

The Changes since the last stable release include:

5.7099_02 2008-07-16 19:10:00
   - Added PathPrefix attribute
   - Removed Catalyst::Build; we've long since moved to
Module::Install
   - Updated Catalyst::Test docs to mention the use of HTTP::Request
 objects (Rafael Kitover)

5.7099_01 2008-06-25 22:36:00
   - Refactored component resolution (component(), models(),
model(), et al). We now
 throw warnings for two reasons:
 1) model() or view() was called with no arguments, and two
results are returned
-- set default_(model|view), current_(model|view) or
current_(model|view)_instance
instead
 2) you call a component resolution method with a string, and
it resorts to a regexp
fallback wherein a result is returned -- if you really
want to search, call the
method with a regex as the argument
   - remove 0-length query string components so warnings aren't
thrown (RT #36428)
   - Update HTTP::Body dep so that the uploadtmp config value will
work (RT #22540)
   - Fix for LocalRegex when used in the Root controller
   - Get some of the optional_* tests working from dirs with
spaces (RT #26455)
   - Fix Catalyst::Utils::home() when application .pm is in the
current dir (RT #34437)
   - Added the ability to remove parameters in req-uri_with() by
passing in
 an undef value (RT #34782)
   - Added $c-go, to do an internal redispatch to another action,
while retaining the
 contents of the stash

Cheers,

-Brian

___
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] Re: [IMPORTANT] TEST Catalyst::Runtime 5.7100 RC1 (aka 5.7099_02)

2008-07-17 Thread Brian Cassidy
As a quick follow-up, mst wanted me to mention some steps to go about
installing the dev release and reverting said release should you want
to go back to the latest stable version.

1) Download the release. This can be done a number of ways, including with wget:

wget http://dev.thefeed.no/stuff/Catalyst-Runtime-5.7099_02.tar.gz

2) Uncompress the file:

tar zxvf Catalyst-Runtime-5.7099_02.tar.gz

3) Run the makefile:

perl Makefile.PL

4) Install any missing dependencies:

make installdeps

5) Run the test suite -- this is the first place you might see errors,
please report them should that be the case

make test

6) Install it!

sudo make install

Now you can try out your apps against the new development release.
Should you wish to revert back to 5.7014, download this file:

http://search.cpan.org/CPAN/authors/id/M/MR/MRAMBERG/Catalyst-Runtime-5.7014.tar.gz

and repeat the steps. I believe you can also do force install
Catalyst from your CPAN client to accomplish the same thing.

Cheers,

-Brian

___
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] [IMPORTANT] TEST Catalyst::Runtime 5.7100 RC1 (aka 5.7099_02)

2008-07-17 Thread Brian Cassidy
On Thu, Jul 17, 2008 at 6:21 PM, J. Shirley [EMAIL PROTECTED] wrote:
 Tests a-ok on two fairly complex apps here, both use chained and the
 standard assortment of plugins (Auth, Session, Cache, Params::Nested).
 Also tests fine with View::TT,Mason,Email

 Catalyst::Controller::DBIC::API and Catalyst::Action::REST play nice as well.

Thanks for playing along! :)

 Next question: When will the cat wear antlers?

I hope I'm not speaking out of turn, but, I believe...

Once 5.7100 goes gold, cata-moose will be merged with 5.70/trunk
(mst will be the one to do that, I'm sure). From there we'll have to
make sure 5.80 is feature complete, fully tested and backwards
compatible -- this last point may require compatibility shims to be
put in place, possibly in the form of Catalyst 5.71x releases should
it affect the core.

Obviously this is a very general outline and has no fixed deadlines --
it'll be ready when its ready. Naturally, when we feel like we're
close, we'll do a dev release.

-Brian

___
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] [IMPORTANT] TEST Catalyst::Runtime 5.7100 RC1 (aka 5.7099_02)

2008-07-17 Thread Brian Cassidy
On Thu, Jul 17, 2008 at 7:17 PM, Brian Cassidy [EMAIL PROTECTED] wrote:
 I hope I'm not speaking out of turn, but, I believe...

As it turns out:

[21:15] mst   bricas: incidentally, you're wrong about catamoose -
5.80 trunk is where it's staying
[21:15] mst   bricas: we'll cut 5.80 straight off there so 5.70
bugfixing can continue until it's out

FYI:

5.70 trunk: 
http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/5.70/trunk/
5.80 trunk: 
http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/5.80/trunk/

-Brian

___
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] [RFC] refactoring of component resolution methods + warnings

2008-05-30 Thread Brian Cassidy

Hey All,

Further to my message from the 27th of May about component resolution, I 
have created a branch [1] to refactor how it works behind the scenes.


Here is the excerpt from my updates to the Changes file:

- Refactored component resolution (component(), models(), model(), et 
al). We now

  throw warnings for two reasons:
  1) model() or view() was called with no arguments, and two results 
are returned
 -- set default_(model|view), current_(model|view) or 
current_(model|view)_instance

 instead
  2) you call a component resolution method with a string, and it 
resorts to a regexp
 fallback wherein a result is returned -- if you really want to 
search, call the

 method with a regex as the argument

In detail, I've gutted most of the private methods that were used for 
this task. In their place are 3 methods:


(1) _filter_component() -- this hasn't changed. it handles components 
that ACCEPT_CONTEXT.
(2) _comp_names() -- a slight implementation change. used, for example, 
when you need to grab all of the valid values for controllers.
(3) _comp_search_prefixes() -- this combines the old _comp_singular, 
_comp_explicit and _comp_search methods in to one method.


Although combining the 3 methods in to 1 sounds bad, the result is 32 
lines long -- 19 if you take out blank lines and comments.


Besides the refactoring, there is now an explicit regexp behavior for 
component searching. All of model(), view(), controller() and 
component() will accept a regexp and return (in list context) the matches.


Example from the docs:

# find all views that start with Foo
my @foo_views = $c-view(qr{^Foo});

FYI: all of the existing tests pass, plus I've added a number of new 
tests for the regexp behavior.


Please take a look and pass along your comments.

-Brian

[1] 
http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Runtime/5.70/branches/compres/


___
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] Re: new catalyst version breaks test in Catalyst-Model-Adaptor-0.02 and Catalyst-Plugin-Unicode-0.8

2008-05-23 Thread Brian Cassidy

John Goulah wrote:

On Mon, May 19, 2008 at 5:35 PM, John Goulah [EMAIL PROTECTED] wrote:

Hi folks,

I've narrowed down that the new version (5.7013) breaks tests in both
of these modules, but I'm not sure why  (they work against the last
version of Catalyst 5.7012, so there has been some change thats
affected this)


mst thinks this is almost certainly an error screen, anyone care to comment?


This was a regression I created when trying to solve the Path(0) bug. 
Essentially Path by itself means Path('') which is defined but of 0 
length.


Fixed in svn r7778 (+ test).

-Brian

___
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] FYI: Contracting possibilities

2008-05-13 Thread Brian Cassidy

J. Shirley wrote:

Brian, are you sure this is a legit gig?  It seems moderately
419-esque in the vocabulary and some other things.


Not sure at all. In the interest of full disclosure here is the private 
message i was sent (on vox) -- there isn't much private about it, so i'm 
sure he wont' mind.


---

Catalyst help required
Hi Brian,

I am looking for Catalyst help.  Do you know of any hired guns out there 
looking to do some fairly easy projects?  We are in Silicon Valley but 
can work with anyone.



thanks,
Michael

---

-Brian

___
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] Hair-pulling over YAML config

2008-01-24 Thread Brian Cassidy
I'm not really sure why this thread was resurrected from almost a year 
ago... but...



Carl Vincent [EMAIL PROTECTED] writes:

I've just spent an inordinate amount of time debugging a problem which
was actually caused by my Yaml config file not parsing properly.
Catalyst isn't helping much - all it does is skip out the line of debug
that says [debug] Loaded Config ... and that's easy to overlook.

I discovered that when the file is loaded in Config::Any, if there's an
error with the parsing it just skips it and doesn't bother to alert
anyone.


FYI, Config::Any 0.10 will now die on bogus config files.

[EMAIL PROTECTED]:~$ perl -MConfig::Any -e 'Config::Any-load_files( { files 
= [shift], use_ext = 1 } );' t.yml

Error parsing file: t.yml at -e line 1

-Brian



___
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::Utils::env_value ?

2008-01-09 Thread Brian Cassidy

Jesper Krogh wrote:

Can anyone help me find out what my problem is here?

$ perl -MDevel::SimpleTrace script/efam_server.pl
Undefined subroutine Catalyst::Utils::env_value called


What version of Catalyst do you have? The env_value sub only appears in 
5.7008 and above..


-Brian

___
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] Problem with Catalyst::Plugin::I18N using UTF-8

2007-12-21 Thread Brian Cassidy

Knut-Olav Hoven wrote:
There are some problems when translating with Catalyst::Plugin::I18N using 
special unicode characters like æøå.


It got printed (both in console/debugging) and in web browser) as unprintable 
characters (displayed as ?). Manually changing encoding in Firefox to 
ISO-8859-1 made it look right, but the rest of the page is using UTF-8, so 
this was a no-go solution for me.


The solution I found to this was to change line 65 of Catalyst/Plugin/I18N.pm 
(version 0.06), changed the Decode attribute given 
to Locale::Maketext::Simple from 1 to 0.


I'm using the I18N plugin with unicode characters just fine. Your 
work-around seems suspect to me.


Are you using the Unicode plugin? If not, try adding that to the mix and 
see if that makes things jive for ya.


-Brian

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


Re: [Catalyst] Problem with Catalyst::Plugin::I18N using UTF-8

2007-12-21 Thread Brian Cassidy

Knut-Olav Hoven wrote:

That seems like an odd solution...

The Decode parameter is used to decode unicode characters, while the Unicode 
plugin is encoding to unicode...?


This tutorial was never complete, and it's getting a little bit on the 
old side, but it's basically still valid:


http://dev.catalyst.perl.org/svnweb/Catalyst/view/trunk/Catalyst-Plugin-I18N/lib/Catalyst/Plugin/I18N/Manual.pod

(Note the use of the Unicode plugin)

-Brian

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