Jifty

 view release on metacpan or  search on metacpan

doc/notes-on-distributed-operations  view on Meta::CPAN



Application behaviour:
    
    * Application-specific behaviours are side effects.
    * Some side effects run when an update is replicated in
    * Some side effects run when an update is created locally
    * Some side effects run when an update first enters the system, regardless of whether it's locally created or replicated
    * Some side effects only cause other database updates. These can _potentially_ be rolled back when the transaction
      is created
    * Some side effects perform an external action. These can never be rolled back. They cascade. Once a side effect has taken place, we're stuck with the transaction.





lib/Jifty/Handler.pm  view on Meta::CPAN

    );

    for ( grep { defined $_ } map { $_->psgi_app_static } Jifty->plugins ) {
        $static->add( $_ );
    }

    $static->add( Plack::App::File->new
            ( root => Jifty->config->framework('Web')->{DefaultStaticRoot} )->to_app );

    # the buffering and unsetting of psgi.streaming is to vivify the
    # responded res from the $static cascade app.
    builder {
        enable 'Plack::Middleware::ConditionalGET';
        enable
            sub { my $app = shift;
                  sub { my $env = shift;
                        $env->{'psgi.streaming'} = 0;
                        my $res = $app->($env);
                        # skip streamy response
                        return $res unless ref($res) eq 'ARRAY' && $res->[2];
                        my $h = Plack::Util::headers($res->[1]);;

lib/Jifty/Web/Menu.pm  view on Meta::CPAN

        $self->{url} = URI->new_abs($self->{url}, $self->parent->url . "/")->as_string
            if defined $self->{url} and $self->parent and $self->parent->url;
        $self->{url} =~ s!///!/! if $self->{url};
    }
    return $self->{url};
}

=head2 active [BOOLEAN]

Gets or sets if the menu item is marked as active.  Setting this
cascades to all of the parents of the menu item.

=cut

sub active {
    my $self = shift;
    if (@_) {
        $self->{active} = shift;
        $self->parent->active($self->{active}) if defined $self->parent;
    }
    return $self->{active};



( run in 0.520 second using v1.01-cache-2.11-cpan-49f99fa48dc )