App-CamelPKI
view release on metacpan or search on metacpan
license => 'perl',
dist_author =>
'Jérémie Klein <grm.klein@gmail.com>',
requires =>
{
'B' => 0, # To detect mod_perl (!)
'Error' => 0,
'NEXT' => 0,
'Class::Inspector' => 0,
'MIME::Base64' => 0,
'DateTime' => 0,
'Sys::Hostname' => 0,
'IO::Socket::INET' => 0, # App::CamelPKI::SysV::Apache
'Crypt::OpenSSL::CA' => 0.09,
'Catalyst' => '5.7006', # RenderView is needed
'Catalyst::Plugin::ConfigLoader' => 0,
'Catalyst::Plugin::Static::Simple' => 0,
'Catalyst::Action::RenderView' => 0,
'Catalyst::Engine::Apache' => 0,
'Catalyst::View::TT' => 0,
'JSON' => 1.07, # UTF-8 support needed
Catalyst::Engine::Apache: 0
Catalyst::Plugin::ConfigLoader: 0
Catalyst::Plugin::Static::Simple: 0
Catalyst::View::JSON: 0
Catalyst::View::TT: 0
Class::Inspector: 0
Crypt::OpenSSL::CA: 0.09
Crypt::X509: 0.32
DBD::SQLite: 0
DBIx::Class: 0.07
DateTime: 0
Error: 0
File::Slurp: 0
IO::Socket::INET: 0
IPC::Run: 0
JSON: 1.07
MIME::Base64: 0
NEXT: 0
SQL::Translator: 0.07
Sys::Hostname: 0
Test::Group: 0
So, to resume, under Ubuntu, for minimum requirements (tests won't all be runned) :
In this case, the php front-end won't be usable with this apache instance(which is, by the way, not a good idea).
#apt-get install apache2 apache2-threaded-dev libapache2-mod-perl2 build-essential libnet-ssleay-perl libssl-dev
If you want to run the entire test suite, you need some other functionnalities. Install the with :
#apt-get install libapache2-mod-php5 php5-common php5-cli php5-curl
2. Installation of the Perl Modules :
You have to install some perl modules from CPAN in order to make work the application.
cpan > install Module::Build File::Slurp MIME::Base64 Error DateTime Sys::Hostname IO::Socket::INET Config::General Config::Tiny XML::Simple Catalyst Catalyst::Plugin::ConfigLoader Catalyst::Plugin::Static::Simple Catalyst::Action::RenderView Catalys...
And if you want to run the full test suite and for devs environments:
cpan> install Module::ScanDeps Test::NoBreakpoints Test::Pod::Coverage Catalyst::Helper
For the moment, App::Crypt::OpenSSL::CA won't install because of failing tests. These tests fails
because they aren't coded. You can install it by hand or by forcing it, making sure that only tests 12 and 13 of
lib/Crypt/OpenSSL/CA are failing.
3. Extract the App-CamelPKI archive and create your own app_camelpki.yml (a sample can be found 'app_camelpki.yml.sample').
lib/App/CamelPKI/Time.pm view on Meta::CPAN
L</SYNOPSIS>), they automagically convert themselves into the "Zulu"
notation (yyymmddhhmmssZ).
=head1 CAPABILITY DISCIPLINE
I<App::CamelPKI::Time> objects are pure data; they do not carry privileges.
=cut
use App::CamelPKI::Error;
use DateTime;
use DateTime::Duration;
=head1 CONSTRUCTORS
=head2 parse($time)
=head2 parse($time, -format => $format)
Parses $time, a string, returns an instance of I<App::CamelPKI::Time>. The
default format (and the only one supported for now) is "Zulu".
lib/App/CamelPKI/Time.pm view on Meta::CPAN
throw App::CamelPKI::Error::Internal
("UNIMPLEMENTED",
-details => "unsupported format $opts{-format}")
unless ($opts{-format} eq "Zulu");
throw App::CamelPKI::Error::Internal("INCORRECT_ARGS",
-details => "cannot parse time")
unless my ($Y, $M, $D, $h, $m, $s) =
($time =~ m/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})Z$/);
return bless
{ dt => DateTime->new(year => $Y, month => $M, day => $D,
hour => $h, minute => $m, second => $s),
}, $class;
}
=head2 now()
Returns the current system time.
=cut
sub now {
my ($class) = @_;
return bless { dt => DateTime->now() }, $class;
}
=head1 METHODS
=head2 zulu()
Returns the time in "Zulu" format. This method is also used as the
stringgification operator overload.
=cut
lib/App/CamelPKI/Time.pm view on Meta::CPAN
Returns a copy of this I<App::CamelPKI::Time> object advanced by the
specified number of days (which may be negative).
=cut
sub advance_days {
my ($self, $days) = @_;
throw App::CamelPKI::Error::Internal("WRONG_NUMBER_ARGS")
if (! defined $days);
my $dt = $self->{dt}->clone;
my $duration = DateTime::Duration->new(days => abs($days));
$days >= 0 ? $dt->add_duration($duration) :
$dt->subtract_duration($duration);
return bless { dt => $dt }, ref($self);
}
=head2 advance_years($years)
Returns a copy of this I<App::CamelPKI::Time> object advanced by the
specified number of years, which may be negative.
=cut
sub advance_years {
my ($self, $days) = @_;
throw App::CamelPKI::Error::Internal("WRONG_NUMBER_ARGS")
if (! defined $days);
my $dt = $self->{dt}->clone;
my $duration = DateTime::Duration->new(years => abs($days));
$days >= 0 ? $dt->add_duration($duration) :
$dt->subtract_duration($duration);
return bless { dt => $dt }, ref($self);
}
=head2 make_your()
Nothing, actually.
=cut
t/maintainer/dependencies.t view on Meta::CPAN
# automatically.
our %is_subpackage_of =
( "Catalyst::Controller" => "Catalyst",
"Catalyst::View" => "Catalyst",
"Catalyst::Model" => "Catalyst",
"Catalyst::Runtime" => "Catalyst",
"Catalyst::Utils" => "Catalyst",
"Catalyst::Action" => "Catalyst",
"Catalyst::Test" => "Catalyst",
"DBIx::Class::Schema" => "DBIx::Class",
"DateTime::Duration" => "DateTime",
);
=head2 @pervasives
The list of modules that can be assumed to always be present
regardless of the version of Perl, and need not be checked for. By
default only pragmatic modules (starting with a lowercase letter) and
modules that already were in 5.000 according to L<Module::CoreList>
are listed.
( run in 0.435 second using v1.01-cache-2.11-cpan-05444aca049 )