Ambrosia
view release on metacpan or search on metacpan
benchmark/Ambrosia/Meta.b
benchmark/Ambrosia/QL.b
benchmark/Ambrosia/Utils/Enumeration.b
benchmark/Ambrosia/core/ClassFactory.b
benchmark/Ambrosia/core/Nil.b
benchmark/Ambrosia/core/Object.b
lib/Ambrosia.pm
lib/Ambrosia/Addons/Accessor.pm
lib/Ambrosia/Addons/Authorize.pm
lib/Ambrosia/Addons/Session.pm
lib/Ambrosia/Addons/Session/Cookie.pm
lib/Ambrosia/Assert.pm
lib/Ambrosia/BaseManager.pm
lib/Ambrosia/CommonGatewayInterface.pm
lib/Ambrosia/CommonGatewayInterface/ApacheRequest.pm
lib/Ambrosia/CommonGatewayInterface/CGI.pm
lib/Ambrosia/CommonGatewayInterface/Options.pm
lib/Ambrosia/Config.pm
lib/Ambrosia/Context.pm
lib/Ambrosia/DataProvider.pm
lib/Ambrosia/DataProvider/BaseDriver.pm
Moose: 0
Test::Deep: 0
Test::Exception: 0
Test::More: 0
requires:
Apache: 0
Apache::Constants: 0
Apache::Request: 0
Carp: 0
CGI: 0
CGI::Cookie: 0
Data::Dumper: 0
Data::Serializer: 0
DBI: 0
Exporter: 0
File::Path: 0
Getopt::Long::Descriptive: 0.087
if: 0
integer: 0
IO::File: 0
JSON::XS: 0
Makefile.PL view on Meta::CPAN
},
'DISTNAME' => 'Ambrosia',
'EXE_FILES' => [],
'LICENSE' => 'perl',
'NAME' => 'Ambrosia',
'PREREQ_PM' => {
'Apache' => '0',
'Apache::Constants' => '0',
'Apache::Request' => '0',
'CGI' => '0',
'CGI::Cookie' => '0',
'Carp' => '0',
'DBI' => '0',
'Data::Dumper' => '0',
'Data::Serializer' => '0',
'Exporter' => '0',
'File::Path' => '0',
'Getopt::Long::Descriptive' => '0.087',
'IO::File' => '0',
'JSON::XS' => '0',
'SOAP::Lite' => '0',
lib/Ambrosia/Addons/Session/Cookie.pm view on Meta::CPAN
package Ambrosia::Addons::Session::Cookie;
use strict;
use warnings;
use Carp;
use CGI::Cookie;
use Ambrosia::Utils::Container;
use Ambrosia::core::Object;
use Ambrosia::Meta;
class sealed
{
public => [qw/expires path/],
private => [qw/__cookie/]
};
our $VERSION = 0.010;
sub _init
{
my $self = shift;
$self->SUPER::_init( @_ );
my @cookie = fetch CGI::Cookie;
$self->__cookie = scalar @cookie && @cookie % 2 == 0 ? {@cookie} : {};
$self->path ||= '/';
}
sub getSessionName
{
return 'cookie';
}
sub getSessionValue
lib/Ambrosia/Addons/Session/Cookie.pm view on Meta::CPAN
my $self = shift;
return [ values %{$self->__cookie} ];
}
sub addItem
{
my $self = shift;
my $key = shift;
my $value = shift;
$self->__cookie->{$key} = new CGI::Cookie(
-name => $key,
-value => (ref $value ? new Ambrosia::Utils::Container(__data => {$key => $value})->dump : $value),
-expires => $self->expires,
-path => $self->path
);
}
sub getItem
{
my $self = shift;
lib/Ambrosia/Addons/Session/Cookie.pm view on Meta::CPAN
{
return scalar keys %{$_[0]->__cookie};
}
1;
__END__
=head1 NAME
Ambrosia::Addons::Session::Cookie -
=head1 VERSION
version 0.010
=head1 SYNOPSIS
use Ambrosia::Addons::Session::Cookie;
=head1 DESCRIPTION
C<Ambrosia::Addons::Session::Cookie> .
=head1 CONSTRUCTOR
=head1 THREADS
Not tested.
=head1 BUGS
Please report bugs relevant to C<Ambrosia> to <knm[at]cpan.org>.
lib/Ambrosia/CommonGatewayInterface/ApacheRequest.pm view on Meta::CPAN
elsif( $k eq 'PRAGMA')
{
$no_cache = $params{$_};
}
elsif( $k eq 'COOKIE' || $k eq 'COOKIES' )
{
my @cookies = ref $params{$_} eq 'ARRAY' ? @{$params{$_}} : $params{$_};
foreach (@cookies)
{
my $cs = eval { $_->can('as_string') and $_->as_string; } || $_;
push @headers, 'Set-Cookie: ' . $cs if $cs;
}
$date = 1;
}
elsif( $k eq 'STATUS' )
{
$status = $params{$_};
push @headers, 'Status: ' . $status;
}
elsif( $k eq 'EXPIRES' )
{
lib/Ambrosia/Context.pm view on Meta::CPAN
=head1 VERSION
version 0.010
=head1 SYNOPSIS
use Ambrosia::Context;
instance Ambrosia::Context( proxy => $URI )
->on_start( sub {
instance Ambrosia::Plugin::Session(storage => new Ambrosia::Plugin::Session::Cookie())
} )
->on_abort( sub {session->destroy} )
->on_finish( sub {session->destroy} );
=head1 DESCRIPTION
C<Ambrosia::Context> is a context of application.
=head1 CONSTRUCTOR
share/Templates/Common/HandlerModule.xsl view on Meta::CPAN
use Ambrosia::Config assign => '<xsl:value-of select="$RealAppName" />';
use Ambrosia::Logger assign => '<xsl:value-of select="$RealAppName" />';
use Ambrosia::Context;
use Ambrosia::DataProvider;
use Ambrosia::Dispatcher;
use Ambrosia::View::XSLT;
use Ambrosia::View::JSON;
use Ambrosia::BaseManager;
<xsl:if test="/atns:Application/@Authorization!='NO'">
use Ambrosia::Addons::Session;
use Ambrosia::Addons::Session::Cookie;
use Ambrosia::Addons::Accessor;
use <xsl:value-of select="$RealAppName" />::Accessor;
use <xsl:value-of select="$RealAppName" />::Authorize;
instance <xsl:value-of select="$RealAppName" />::Accessor( <xsl:value-of select="$RealAppName" /> => authorize => new <xsl:value-of select="$RealAppName" />::Authorize() );
</xsl:if>
instance Ambrosia::Context(config->CommonGatewayInterface)
->on_start( sub {
instance Ambrosia::Addons::Session(storage => new Ambrosia::Addons::Session::Cookie())
} )
->on_abort( sub {session->destroy} )
->on_finish( sub {session->destroy} );
instance Ambrosia::DataProvider(<xsl:value-of select="$RealAppName" /> => config->data_source);
my $viewXML = new Ambrosia::View::XSLT( charset => config->Charset, rootName => '<xsl:value-of select="$UcAppName" />' );
my $viewJSON = new Ambrosia::View::JSON( charset => config->Charset );
$dispatcher = Ambrosia::Dispatcher
( run in 0.462 second using v1.01-cache-2.11-cpan-e9199f4ba4c )