Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    Catalyst 5.80030

    Download button

    No screenshots available
    Downloads: 414  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Sebastian Riedel | More programs
    Perl Artistic License / FREE
    January 6th, 2011, 07:51 GMT [view history]
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Catalyst description

    A Perl module that contains the elegant MVC web application framework

    Catalyst is a Perl module that contains the elegant MVC web application framework.

    SYNOPSIS

    See the Catalyst::Manual distribution for comprehensive documentation and tutorials.

    # Install Catalyst::Devel for helpers and other development tools
    # use the helper to create a new application
    catalyst.pl MyApp

    # add models, views, controllers
    script/myapp_create.pl model MyDatabase DBIC::Schema create=dynamic dbi:SQLite:/path/to/db
    script/myapp_create.pl view MyTemplate TT
    script/myapp_create.pl controller Search

    # built in testserver -- use -r to restart automatically on changes
    # --help to see all available options
    script/myapp_server.pl

    # command line testing interface
    script/myapp_test.pl /yada

    ### in lib/MyApp.pm
    use Catalyst qw/-Debug/; # include plugins here as well

    ### In lib/MyApp/Controller/Root.pm (autocreated)
    sub foo : Global { # called for /foo, /foo/1, /foo/1/2, etc.
    my ( $self, $c, @args ) = @_; # args are qw/1 2/ for /foo/1/2
    $c->stash->{template} = 'foo.tt'; # set the template
    # lookup something from db -- stash vars are passed to TT
    $c->stash->{data} =
    $c->model('Database::Foo')->search( { country => $args[0] } );
    if ( $c->req->params->{bar} ) { # access GET or POST parameters
    $c->forward( 'bar' ); # process another action
    # do something else after forward returns
    }
    }

    # The foo.tt TT template can use the stash data from the database
    [% WHILE (item = data.next) %]
    [% item.foo %]
    [% END %]

    # called for /bar/of/soap, /bar/of/soap/10, etc.
    sub bar : Path('/bar/of/soap') { ... }

    # called for all actions, from the top-most controller downwards
    sub auto : Private {
    my ( $self, $c ) = @_;
    if ( !$c->user_exists ) { # Catalyst::Plugin::Authentication
    $c->res->redirect( '/login' ); # require login
    return 0; # abort request and go immediately to end()
    }
    return 1; # success; carry on to next action
    }

    # called after all actions are finished
    sub end : Private {
    my ( $self, $c ) = @_;
    if ( scalar @{ $c->error } ) { ... } # handle errors
    return if $c->res->body; # already have a response
    $c->forward( 'MyApp::View::TT' ); # render template
    }

    ### in MyApp/Controller/Foo.pm
    # called for /foo/bar
    sub bar : Local { ... }

    # called for /blargle
    sub blargle : Global { ... }

    # an index action matches /foo, but not /foo/1, etc.
    sub index : Private { ... }

    ### in MyApp/Controller/Foo/Bar.pm
    # called for /foo/bar/baz
    sub baz : Local { ... }

    # first Root auto is called, then Foo auto, then this
    sub auto : Private { ... }

    # powerful regular expression paths are also possible
    sub details : Regex('^product/(w+)/details$') {
    my ( $self, $c ) = @_;
    # extract the (w+) from the URI
    my $product = $c->req->captures->[0];
    }



    Product's homepage

    Requirements:

    · Perl

    What's New in This Release: [ read full changelog ]

    · The FCGI script wiil be able to set the process title.
    · Chained dispatch has been modified to always prefer paths with the minimum number of captures There were several bugfixes.

      


    TAGS:

    MVC framework | web application framework | Perl module | Catalyst | MVC | web

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM