App-PM-Website
view release on metacpan or search on metacpan
"ExtUtils::MakeMaker" : "6.30"
}
},
"runtime" : {
"requires" : {
"App::Cmd" : "0",
"App::Cmd::Command" : "0",
"Config::YAML" : "0",
"Data::Dumper" : "0",
"Date::Parse" : "0",
"DateTime" : "0",
"DateTime::Format::Strptime" : "0",
"File::Path" : "2.07",
"File::Spec" : "0",
"HTTP::DAV" : "0",
"IO::TieCombine" : "0",
"Lingua::EN::Numbers::Ordinate" : "0",
"Net::Netrc" : "0",
"POSIX" : "0",
"Template" : "0",
"Template::Plugin::DateTime" : "0",
"Template::Plugin::Gravatar" : "0",
"Template::Plugin::String::Compare" : "0",
"YAML::Any" : "0",
"base" : "0",
"strict" : "0",
"warnings" : "0"
}
},
"test" : {
"requires" : {
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
name: App-PM-Website
requires:
App::Cmd: 0
App::Cmd::Command: 0
Config::YAML: 0
Data::Dumper: 0
Date::Parse: 0
DateTime: 0
DateTime::Format::Strptime: 0
File::Path: 2.07
File::Spec: 0
HTTP::DAV: 0
IO::TieCombine: 0
Lingua::EN::Numbers::Ordinate: 0
Net::Netrc: 0
POSIX: 0
Template: 0
Template::Plugin::DateTime: 0
Template::Plugin::Gravatar: 0
Template::Plugin::String::Compare: 0
YAML::Any: 0
base: 0
strict: 0
warnings: 0
resources:
homepage: http://lowlevelmanager.com/
repository: http://github.com/spazm/app-pm-website.git
version: 0.131611
Makefile.PL view on Meta::CPAN
"bin/pm-website"
],
"LICENSE" => "perl",
"NAME" => "App::PM::Website",
"PREREQ_PM" => {
"App::Cmd" => 0,
"App::Cmd::Command" => 0,
"Config::YAML" => 0,
"Data::Dumper" => 0,
"Date::Parse" => 0,
"DateTime" => 0,
"DateTime::Format::Strptime" => 0,
"File::Path" => "2.07",
"File::Spec" => 0,
"HTTP::DAV" => 0,
"IO::TieCombine" => 0,
"Lingua::EN::Numbers::Ordinate" => 0,
"Net::Netrc" => 0,
"POSIX" => 0,
"Template" => 0,
"Template::Plugin::DateTime" => 0,
"Template::Plugin::Gravatar" => 0,
"Template::Plugin::String::Compare" => 0,
"YAML::Any" => 0,
"base" => 0,
"strict" => 0,
"warnings" => 0
},
"VERSION" => "0.131611",
"test" => {
"TESTS" => "t/*.t"
[@Basic]
;[ConfirmRelease]
;[UploadToCPAN]
remove = MetaYAML
[TravisYML]
[AutoPrereqs]
[Prereqs]
Template::Plugin::Gravatar = 0
Template::Plugin::DateTime = 0
Template::Plugin::String::Compare = 0
; IO::TieCombine is a prereq of App::Cmd::Tester, yet I got a cpantester
; report with App::Cmd::Tester 0.318 that didn't have IO::TieCombine installed
; http://www.cpantesters.org/cpan/report/f0eed71a-f4f1-11e1-bb01-e3918809bd53
IO::TieCombine = 0
[AutoVersion]
major = 0
[PkgVersion]
[MetaJSON]
[NextRelease]
examples/template/index.tt view on Meta::CPAN
<p style="text-align: center;" align="center">
You can subscribe to our mailing list by sending a message
containing only the word 'subscribe' to<br>
<tt>GROUPNAME-pm-request<!-- yes, this is a comment -->@mail.pm.org</tt>
<p>
<h2> Previous Talks </h2>
[%- USE old_date = DateTime( year=2010, month=11, day=17) -%]
[% IF meetings %]
[%- USE String.Compare(old_date.ymd) -%]
<ul>
[%- FOREACH m IN meetings %]
[% LAST IF !String.Compare.compare( m.dt.ymd ) %]
[%- FOREACH talk IN m.presentations %]
[%- speaker = presenter.${talk.presenter} %]
<li><big>[% m.ds1 %]:
[% IF speaker.url -%]
<a href=[% speaker.url %]>[% speaker.name %]</a>
lib/App/PM/Website.pm view on Meta::CPAN
Meetings have additional date keys added from the C<event_date> or C<epoch> field.
=over
=item * C<epoch>
event time in epoch unix seconds. Created from C<event_date> if missing.
=item * C<dt>
a DateTime object created from C<epoch>
=item * C<ds1>
C<dt> rendered using strp pattern '%Y-%b-%d'.
=item * C<ds_std>
C<dt> rendered using strp pattern '%A %B %e, %Y'.
=item * C<event_date_pretty>
lib/App/PM/Website/Command.pm view on Meta::CPAN
$App::PM::Website::Command::VERSION = '0.131611';
}
#use App::Cmd::Setup -command;
use strict;
use warnings;
use base 'App::Cmd::Command';
use Config::YAML;
use POSIX qw(strftime);
use Data::Dumper;
use Date::Parse qw(str2time);
use DateTime::Format::Strptime;
use DateTime;
use Lingua::EN::Numbers::Ordinate qw(ordinate);
#ABSTRACT: Parent class for App::PM::Website commands
sub opt_spec
{
my ( $class, $app ) = @_;
return (
$class->options($app),
[ 'config-file=s' => "path to configuration file",
lib/App/PM/Website/Command.pm view on Meta::CPAN
{
my ( $self, $opt, $args ) = @_;
$self->{config} = Config::YAML->new( config => $opt->{config_file} )
or die $self->usage_error("failed to open configuration file: $!");
}
sub meetings
{
my $self = shift;
my $meetings = $self->{config}->get_meetings;
my $strp = new DateTime::Format::Strptime(
pattern => '%Y-%b-%d',
locale => 'en',
);
my $strp_std = new DateTime::Format::Strptime(
pattern => '%A %B %e, %Y',
locale => 'en',
);
my $strp_pretty = new DateTime::Format::Strptime(
pattern => '%A the %e',
locale => 'en',
);
for my $meeting (@$meetings)
{
$meeting->{epoch} ||= str2time( $meeting->{event_date}, 'PST' );
my $dt = DateTime->from_epoch( epoch => $meeting->{epoch} );
$meeting->{dt} = $dt;
$meeting->{ds1} ||= $strp->format_datetime($dt);
$meeting->{ds_std} ||= $strp_std->format_datetime($dt);
my $pretty = $strp_pretty->format_datetime($dt);
$pretty =~ s/(\d+) \s* $/ordinate($1)/ex;
$meeting->{event_date_pretty} = $pretty;
}
sort { $b->{epoch} <=> $a->{epoch} } @$meetings;
}
( run in 0.300 second using v1.01-cache-2.11-cpan-2b0bae70ee8 )