Congrats to Jrockway on releasing Angerwhale. Angerwhale is a filesystem-based blog with integrated cryptography, built on the Catalyst framework.
You can get angerwhale on CPAN.
You can get angerwhale on CPAN.
If you use Catalyst auth with hashed passwords, here's how to create the digest in your DBIx::Class user class automatically.
sub store_column {
my ($self,$col,$val)= @_;
$val=Digest::SHA::sha1_hex($val) if ($col eq 'password');
return $self->next::method($col,$val);
}
sub store_column {
my ($self,$col,$val)= @_;
$val=Digest::SHA::sha1_hex($val) if ($col eq 'password');
return $self->next::method($col,$val);
}
Even tho we haven't got the holy buzz of Rails, people seem to be putting up new Catalyst-powered sites all the time. I'll try to mention some as I hear of them in the future, here's a couple to get you started
www.discvrevolt.com
Let's get dugg
This is a neat blog powered by a new Catalyst-based blog software called Typeface. Typeface is downloadable right now, so feel free to check it out.
www.discvrevolt.com
21:17 <bert_> it is for independent artists to be able to easily sell card at
their live shows, and fans use them to dl songs from our site
when they get home...
21:18 <bert_> site went from concept to production in 3 months...
21:18 <bert_> you guys here helped us through the rough part, none of us had
used catalyst before this...
21:18 <bert_> we really appreciate your help
Let's get dugg
This is a neat blog powered by a new Catalyst-based blog software called Typeface. Typeface is downloadable right now, so feel free to check it out.
I often find myself needing to make actions that should only be dispatched to by the POST method, or writing dispatch logic to distinguish between POST and GET in my various methods. It would be nice if the Catalyst dispatcher could handle this for me directly. However, we should probably support the whole HTTP spec, and adding those would pollute the attribute space pretty badly. Thus I suggest that we add a prefix, like do_POST or require_DELETE to the dispatch value. The other alternative is to add a method attribute, which would make the api look something like this
sub admin : Local Method('POST') {}
Obviously, it would have to match against specific methods first, then fall back on a generic handler without a specified method. Any other thoughts on the API?
sub admin : Local Method('POST') {}
Obviously, it would have to match against specific methods first, then fall back on a generic handler without a specified method. Any other thoughts on the API?
Iusethis is one of the more profiled Catalyst sites out there, and people have been asking me what modules I used to build this site. I figured that was worth doing a blog post about, so here goes:
Catalyst::Runtime
Obviously :)
HTML::TagCloud
For /tags , and more recently /user/$user/tags . I've submitted patches to this module so I could generate html the way arne wanted :-) These patches has been rolled into the cpan distro by acme++
Catalyst::Model::DBIC::Schema
During early development, I loaded the DBIC classes automatically, but as I started stabilize the schema,
I used the feature to generate static classes from the database.
Net::Trackback
We support trackbacks using this module. It was pretty easy to integrate into the Catalyst controller,
and later when I found out trackback is a spammer's wet dream, it was easy to add domain checking in the
action. We now do explicit whitelisting of domains, with a user interface to add your domain, if you want
to be linked on the app entry. I'm also planning on adding avatar support through this feature
DBIx::Class::DateTime::Epoch
I store all dates as long ints in the database, and use this module to automatically inflate them to
DateTime objects.
Catalyst::Plugin::Authentication / Store::DBIC / Credential::Password
To handle user authentication. The flexibility nothingmuch++ put into our second generation auth layer makes me very happy. If you do auth in your app, you need to use the Authentication plugins.
Catalyst::Runtime
Obviously :)
HTML::TagCloud
For /tags , and more recently /user/$user/tags . I've submitted patches to this module so I could generate html the way arne wanted :-) These patches has been rolled into the cpan distro by acme++
Catalyst::Model::DBIC::Schema
During early development, I loaded the DBIC classes automatically, but as I started stabilize the schema,
I used the feature to generate static classes from the database.
Net::Trackback
We support trackbacks using this module. It was pretty easy to integrate into the Catalyst controller,
and later when I found out trackback is a spammer's wet dream, it was easy to add domain checking in the
action. We now do explicit whitelisting of domains, with a user interface to add your domain, if you want
to be linked on the app entry. I'm also planning on adding avatar support through this feature
DBIx::Class::DateTime::Epoch
I store all dates as long ints in the database, and use this module to automatically inflate them to
DateTime objects.
Catalyst::Plugin::Authentication / Store::DBIC / Credential::Password
To handle user authentication. The flexibility nothingmuch++ put into our second generation auth layer makes me very happy. If you do auth in your app, you need to use the Authentication plugins.
( Read more... )
22:52 < Peyomp> Is there somewhere that explains clearly, what benefits
Catalyst gives over straight CGI and TTthat is suitable for
management types?
22:55 < drPoggs> Peyomp: Yeah - go in, say Catalyst and rub your thighs
vigorously at your manager :)
22:56 < drPoggs> Peyomp: Then say CGI and look sad.
Catalyst gives over straight CGI and TTthat is suitable for
management types?
22:55 < drPoggs> Peyomp: Yeah - go in, say Catalyst and rub your thighs
vigorously at your manager :)
22:56 < drPoggs> Peyomp: Then say CGI and look sad.
<script type="text/javascript" src="http://osx.iusethis.com/app/include/i term"></script>
<noscript><a href="http://osx.iusethis.com/app/iterm" >Support iTerm on iusethis</a></noscript>
This is how a live iusethis count with a logo currently looks. However, I am unable to include that in any blogs I have tested so far. Any suggestions for better ways to make dynamic content that bloggers can include in their posts? For example, I'd like for them to be able to use this in a header for an app review, or to blog what apps you are using. The only thing that springs to mind is making dynamic images, but that seems like a very crude way to implement such a feature. I understand the security concerns here, but I'm still a little frusterated with the limitations.
Dear lazyweb, please help? *sigh*
<noscript><a href="http://osx.iusethis.com/app/iterm"
This is how a live iusethis count with a logo currently looks. However, I am unable to include that in any blogs I have tested so far. Any suggestions for better ways to make dynamic content that bloggers can include in their posts? For example, I'd like for them to be able to use this in a header for an app review, or to blog what apps you are using. The only thing that springs to mind is making dynamic images, but that seems like a very crude way to implement such a feature. I understand the security concerns here, but I'm still a little frusterated with the limitations.
Dear lazyweb, please help? *sigh*
- Mood:
blank
Serving a response in Catalyst is pretty easy. Usually, we either stuff
a scalar into the response body, or just let the view take care of it like
this:
$c->res->body('dude, what's up?');
$c->forward($c->view); # Or just let RenderView handle it
# As is the default.
However, sometimes this is not practical for your purpose. Maybe you
need to serve a streaming mp3, or you have a big file that you don't want
to load into memory all at once... Fixing this is just as easy, tho.
my $fh=io('/tmp/bigfile');
$c->res->body($fh);
and presto, Catalyst will serve the response from the filehandle. Of course
you will have to tell catalyst how much data you expect $fh to contain
since the headers are written before the response body.
$c->res->content_length(-s $file)Would be a simple example of how to do that.
Bugged by slow startup times with DBIx::Class and Catalyst? Try upgrading
to the latest version of Algorithm::C3 and PathTools.
(This will be the first in a series where I show how I solved some of
the issues in making http://osx.iusethis.com/)
Iusethis uses a common layout style with one main pane, and a smaller
right-hand sidebar. We've made it so it is easy to reuse these sidebar
items by putting them in a /sidebar folder in our template directory.
Then we can just do stuff like [% PROCESS sidebar/didyouknow.tt %],
and presto, you have a box like the one you can see on
SQLitemanager for
instance.
This box was implemented 100% in the TT view, so that it doesn't require
anything from the controller. To pick a random number, I use the TT Math
plugin like this:
[%USE Math %] [%SET tip=Math.int(Math.rand(10))+1%]This assigns a number from 1 to 10 to the TT tip variable. Now it's just a simple matter of using a TT switch:
[% SWITCH tip %] [% CASE 1 %] You need to floss more often [% CASE 2 %] Don't Panic [% CASE 3 %] ... [% END %]And that's it, really. Hope this comes in handy for someone :)
The Catalyst Core Team is proud to announce that we've just shipped the next major release of the Catalyst framework, version 5.7000. This release is the result of the helpful contributions of a large number of people, both on the documentation and people submitting patches and ideas for improvements. We would like to use this opportunity to thank them for their great work. Catalyst would be much worse of without you guys. Hope you will continue to make us great.
( Read more... )
Enzyme is a CRUD framework for Catalyst and Class::DBI. Castaway has done an unofficial DBIx::Class port of it here:
http://desert-island.dynodns.net:8888/pe rldists/Catalyst-Enzyme-0.12.tar.gz
http://desert-island.dynodns.net:8888/pe
22:13 <+phaylon> we should put that in the faq "If you want the cat devs to
finish a feature, write tests. drives them nuts and makes
them work harder."
22:13 <@marcus> tests++
22:13 <@marcus> will work for tests
22:13 <@marcus> we need that tshirt
22:14 <@mst> phaylon: works on DBIx::Class as well :)
22:14 <+phaylon> indeed :)
22:14 <@mst> that's how marcus got HAVING support added for iusethis
22:14 <@mst> :D
finish a feature, write tests. drives them nuts and makes
them work harder."
22:13 <@marcus> tests++
22:13 <@marcus> will work for tests
22:13 <@marcus> we need that tshirt
22:14 <@mst> phaylon: works on DBIx::Class as well :)
22:14 <+phaylon> indeed :)
22:14 <@mst> that's how marcus got HAVING support added for iusethis
22:14 <@mst> :D
Three Tests for the Catalyst Core
Three Tests for the Catalyst Core under the sky,
Seven for the DBICers in their halls of stone,
Nine for CGI-Appers doomed to die,
One for the Mojoer on his dark throne
In the Land of Mordor where the Shadows lie.
One Test to rule them all, One Test to find them,
One Test to bring them all and in the darkness bind them
In the Land of Mordor where the Shadows lie.
-- Adopted from J R R Tolkien's Three Rings for the Elven Kings
I've recently been working with Moose, Stevan Little's "I can't believe it's not perl6 OOP' module. In the end, we decided to wait with it in Catalyst until 5.8, because of difficulty in remaining backwards compatibility with Class::Accessor, Class::Data::Inheritable and friends. It's a pity, as I'm really looking forward to get rid of some of these, due to their unfriendly approach to perl error reporting. (No, die inside the constructor is not a good approach to telling the user he passed the wrong kind of arguments.)
Still, I am very impressed with what the module can do, and the maturity of the implementation, and have already been using it outside of the Catalyst project. The reason I feel confident using Moose as a OOP system is that it's based on a mature meta object system, Class::MOP. If you want to know more about it, Chromatic of perl.com has written a nice review of Class::MOP here.
Still, I am very impressed with what the module can do, and the maturity of the implementation, and have already been using it outside of the Catalyst project. The reason I feel confident using Moose as a OOP system is that it's based on a mature meta object system, Class::MOP. If you want to know more about it, Chromatic of perl.com has written a nice review of Class::MOP here.
- Mood:
sleepy
Seems kixx has set up another catalyst wiki here. Some interesting resources there, a cookbook and some deployment info.
Hopefully, those of you who have an interest in Catalyst has seen this announcement from Adam Kennedy. He covers most of what we wanted to say there.
So we will try to do that. This whole situation was resolved with very little drama, and for that we owe big thanks to Adam. We're now going to resume the business of improving Catalyst. Expect some more announcements from us in the near future with a more formalized organization, and more information on the Catalyst Roadmap.
11:07 <@acme> anyway, i welcome our new catalyst overlords as long as they change
less stuff and make the error messages better ;-)So we will try to do that. This whole situation was resolved with very little drama, and for that we owe big thanks to Adam. We're now going to resume the business of improving Catalyst. Expect some more announcements from us in the near future with a more formalized organization, and more information on the Catalyst Roadmap.
- Mood:
bouncy
I forgot this yesterday :/
So, seems sri has been playing a little with a continuation plugin based on the new action stuff. With it, you can do something like this:
package MyApp::Controller::Test;
use base 'Catalyst::Controller';
sub counter : Global : MyAction('Counter') {
my ( $self, $c ) = @_;
my $up = $c->continue('up');
my $down = $c->continue('down');
my $counter = $c->action->{counter};
$c->res->body(<<"EOF");
Counter: $counter
<a href="$up">++</a>
<a href="$down">--</a>
EOF
}
package MyApp::Action::Counter;
use Moose::Role;
sub up { shift->{counter}++ }
sub down { shift->{counter}-- }
