view release on metacpan or search on metacpan
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
overload: 0
Makefile.PL view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use Getopt::Long::Descriptive;
use Data::Dumper ();
my $DB_SCHEMA = 'test';
my $DB_HOST = 'localhost';
my $DB_PORT = 3306;
chomp(my $DB_USER = `whoami`);
my $DB_PASSWORD = '';
my ($opt, $usage) = describe_options(
'Makefile.PL %o ',
[ 'schema|s=s', "the schema that use for test", { default => $DB_SCHEMA }],
Makefile.PL view on Meta::CPAN
'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',
'Scalar::Util' => '0',
'Time::HiRes' => '0',
'XML::LibXML' => '0',
benchmark/Ambrosia/CommonGatewayInterface.b view on Meta::CPAN
#!/usr/bin/perl -w
use warnings;
use strict;
use lib qw(lib t);
use Benchmark;
use Data::Dumper;
BEGIN
{
use Ambrosia::Context;
instance Ambrosia::Context({
engine_name => 'CGI',
engine_params => {
header_params => {
Pragma => 'no-cache',
Cache_Control => 'no-cache, must-revalidate, no-store',
benchmark/Ambrosia/QL.b view on Meta::CPAN
#!/usr/bin/perl
use warnings;
use strict;
use lib qw(lib t);
use Benchmark;
use Ambrosia::DataProvider;
use Ambrosia::QL;
use Data::Dumper;
my $confDS = {
DBI => [
{
engine_name => 'mysql',
source_name => 'Client',
user => 'root',
password => '',
engine_params => 'database=test;host=localhost;',
additional_params => { AutoCommit => 0, RaiseError => 1, LongTruncOk => 1 },
benchmark/Ambrosia/core/Object.b view on Meta::CPAN
#!/usr/bin/perl -w
use strict;
use warnings;
use lib qw(lib t);
use Benchmark;
use Data::Dumper;
use Ambrosia::core::ClassFactory;
use Ambrosia::core::Object;
use Bar;
my $bar = new Bar;
$bar->foo_pub1 = 1;
my @fields = $bar->fields;
my @values = ();
lib/Ambrosia/Config.pm view on Meta::CPAN
package Ambrosia::Config;
use strict;
use warnings;
use Data::Dumper;
use base qw/Exporter/;
use Ambrosia::error::Exceptions;
use Ambrosia::core::ClassFactory;
our $VERSION = 0.010;
our @EXPORT = qw/config/;
our %PROCESS_MAP = ();
lib/Ambrosia/Logger.pm view on Meta::CPAN
package Ambrosia::Logger;
use strict;
use warnings;
use File::Path;
use IO::File;
use Data::Dumper;
use Time::HiRes qw ( time );
use Scalar::Util "blessed";
use Ambrosia::error::Exceptions;
use base qw/Exporter/;
our @EXPORT = qw/logger/;
our $VERSION = 0.010;
lib/Ambrosia/Logger.pm view on Meta::CPAN
. ( $subroutine ne '(eval)' ? ('( '.(join ", ", @arg).' )'):'')
. ' At ' . $package
. ' line ' . $line;
}
push @msg, "\nstack frames = [\n", (join "\n", @callers), "\n]";
$self->log_info_ex(@msg);
}
sub __info_ex
{
local $Data::Dumper::Indent = 1;
shift->log( map { ref $_ ? Dumper($_) : $_ } @_);
}
sub __info
{
shift->log( map { ref $_ ? ref $_ : $_ } @_);
}
sub DESTROY
{}
lib/Ambrosia/Logger.pm view on Meta::CPAN
C<logger(name)> - the name is optional param. Call with name if you not assign current process to logger yet.
=head2 assign
Assigns current process to the global named object of type C<Ambrosia::Logger>.
=head1 DEPENDENCIES
L<File::Path>
L<IO::File>
L<Data::Dumper>
L<Time::HiRes>
L<Scalar::Util>
L<Exporter>
L<Ambrosia::error::Exceptions>
=head1 THREADS
Not tested.
=head1 BUGS
lib/Ambrosia/Utils/Container.pm view on Meta::CPAN
package Ambrosia::Utils::Container;
use strict;
use warnings;
use Data::Dumper;
use Ambrosia::Meta;
class
{
private => [qw/__data/]
};
our $VERSION = 0.010;
sub _init
lib/Ambrosia/View/XSLT.pm view on Meta::CPAN
my $self = shift;
my $rootName = shift;
$rootName ||= $self->rootName;
my ($document, $node) = $self->__as_xml(0, $rootName);
$document->setDocumentElement($node);
#warn 'document: ' . $document->toString(2) . "\n";
return wantarray ? ($document, $node) : $document->toString();
}
#use Data::Dumper;
sub __as_xml
{
my $self = shift;
my $ignore = shift;
my $name_node = shift;
my ($document, $node);
eval
{
my $charset = $self->charset || 'utf-8';
lib/Ambrosia/core/Object.pm view on Meta::CPAN
new Foo(foo_pub1 => 'list2.1', foo_pub2 => 'list2.2')
);
}
1;
# file test.pl
#!/usr/bin/perl -w
use strict;
use Data::Dumper;
use Bar;
my $obj1 = new Bar;
$obj1->foo_pub1 = 1;
print $obj1->foo_pub1, "\n";
use Time::HiRes qw ( time );
my $s = 0;
script/ambrosia view on Meta::CPAN
use strict;
use warnings;
################################################################################
# INIT
################################################################################
our $VERSION = 0.010;
our $dispatcher;
our $action;
use Data::Dumper;
our $dist_dir;
our $share_dir;
BEGIN
{
use File::ShareDir 'dist_dir';
eval
{
$dist_dir = dist_dir('Ambrosia');
$share_dir = $dist_dir;
t/Ambrosia/BaseManager.t view on Meta::CPAN
#!/usr/bin/perl
use Test::More tests => 8;
#use Test::Exception;
use Test::Deep;
use lib qw(lib t ..);
use Carp;
use Data::Dumper;
BEGIN {
use_ok( 'Ambrosia::BaseManager' ); #test #1
}
use Ambrosia::Context;
instance Ambrosia::Context( engine_name => 'CGI', engine_params => {} );
Context->start_session();
use Ambrosia::BaseManager;
t/Ambrosia/DataProvider.t view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use Test::More tests => 14;
use Test::Exception;
use lib qw(lib t .);
use Carp;
use Data::Dumper;
BEGIN {
use_ok( 'Ambrosia::DataProvider' ); #test #1
}
my $confDS = do 'db.params';
instance Ambrosia::DataProvider(test => $confDS);
Ambrosia::DataProvider::assign 'test';
t/Ambrosia/EntityDataModel.t view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use Test::More tests => 8;
use Test::Exception;
use Test::Deep;
use lib qw(lib t ..);
use Carp;
use Data::Dumper;
use Ambrosia::DataProvider;
use t::PersonEDM;
BEGIN {
use_ok( 'Ambrosia::EntityDataModel' ); #test #1
}
my $confDS = do 'db.params';
t/Ambrosia/Event.t view on Meta::CPAN
1;
}
{
package main;
use Test::More tests => 5;
use Test::Exception;
use lib qw(lib t ..);
use Carp;
use Data::Dumper;
BEGIN {
use_ok( 'Ambrosia::Event' ); #test #1
}
my $foo = new Foo(foo=>123);
$foo->on_run(sub {$foo->foo=1; return 1;});
$foo->run();
ok($foo->foo == 1, 'fire event'); #test #2
t/Ambrosia/Options.t view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use Test::More tests => 8;
use lib qw(lib t ..);
use Carp;
use Data::Dumper;
BEGIN {
use_ok( 'Ambrosia::CommonGatewayInterface::Options' ); #test #1
}
sub opt_check
{
my $options_spec = shift;
my $opt = shift;
my $param = shift;
t/Ambrosia/QL.t view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
use lib qw(lib t ..);
use Test::More tests => 7;
use Test::Deep;
use Data::Dumper;
use Ambrosia::DataProvider;
#use Ambrosia::QL;
BEGIN {
use_ok( 'Ambrosia::QL' ); #test #1
}
my $confDS = do 'db.params';
t/Ambrosia/Utils/Container.t view on Meta::CPAN
$container->delete('name');
cmp_deeply($container->as_hash(), {age => 33}, 'delete');
$container->set(name => 'John');
ok($container->remove('name') eq 'John', 'delete');
$container->clear();
ok($container->size() == 0, 'clear');
################################################################################
use Data::Dumper;
$container->set(name => deferred::call {{a => 1}});
cmp_deeply({%{$container->get('name')}}, {a => 1}, 'defered call return hash');
$container->set(name => deferred::call {['a', 1]});
cmp_deeply([@{$container->get('name')}], bag('a', 1), 'defered call return array');
$container->set(name => deferred::call {1});
ok($container->get('name') == 1, 'defered call return bool');
$container->set(name => deferred::call {1});
t/Ambrosia/Utils/Enumeration.t view on Meta::CPAN
1;
}
{
package main;
use Test::More tests => 17;
use Test::Exception;
use lib qw(lib t ..);
use Carp;
use Data::Dumper;
BEGIN {
use_ok( 'Ambrosia::Utils::Enumeration' ); #test #1
}
my $foo = new Foo();
$foo->SET_RUN;
ok($foo->IS_RUN, 'set/get property #1');
t/Ambrosia/core/ClassFactory.t view on Meta::CPAN
#!/usr/bin/perl
use Test::More tests => 6;
use Test::Exception;
use Test::Deep;
use Data::Dumper;
use lib qw(lib t ../..);
BEGIN {
use_ok( 'Ambrosia::Meta' ); #test #1
}
require_ok( 'Ambrosia::Meta' ); #test #2
BEGIN {
use_ok( 'Ambrosia::core::ClassFactory' ); #test #3
}
t/Ambrosia/core/Object.t view on Meta::CPAN
#!/usr/bin/perl
use Test::More tests => 23;
use Test::Exception;
use Test::Deep;
use Data::Dumper;
use lib qw(lib t ../..);
BEGIN {
use_ok( 'Ambrosia::Meta' ); #test #1
}
require_ok( 'Ambrosia::Meta' ); #test #2
BEGIN {
use_ok( 'Ambrosia::core::Object' ); #test #3
}