Acme-PM-Barcelona

 view release on metacpan or  search on metacpan

META.yml  view on Meta::CPAN

configure_requires:
  ExtUtils::MakeMaker: '0'
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.017, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: '1.4'
name: Acme-PM-Barcelona
requires:
  DateTime: '0'
  DateTime::Event::ICal: '0'
  DateTime::Set: '0'
resources:
  bugtracker: https://github.com/barcelonapm/Acme-PM-Barcelona/issues
  repository: https://github.com/barcelonapm/Acme-PM-Barcelona.git
version: '0.06'
x_generated_by_perl: v5.32.0
x_serialization_backend: 'YAML::Tiny version 1.73'
x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later'

Makefile.PL  view on Meta::CPAN

my %WriteMakefileArgs = (
  "ABSTRACT" => "Talks and projects by Barcelona.pm",
  "AUTHOR" => "Alex Muntada <alexm\@cpan.org>",
  "CONFIGURE_REQUIRES" => {
    "ExtUtils::MakeMaker" => 0
  },
  "DISTNAME" => "Acme-PM-Barcelona",
  "LICENSE" => "perl",
  "NAME" => "Acme::PM::Barcelona",
  "PREREQ_PM" => {
    "DateTime" => 0,
    "DateTime::Event::ICal" => 0,
    "DateTime::Set" => 0
  },
  "VERSION" => "0.06",
  "test" => {
    "TESTS" => "t/*.t"
  }
);


my %FallbackPrereqs = (
  "DateTime" => 0,
  "DateTime::Event::ICal" => 0,
  "DateTime::Set" => 0
);


unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
  delete $WriteMakefileArgs{TEST_REQUIRES};
  delete $WriteMakefileArgs{BUILD_REQUIRES};
  $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}

delete $WriteMakefileArgs{CONFIGURE_REQUIRES}

dist.ini  view on Meta::CPAN

[PodCoverageTests]
[PodSyntaxTests]

[PodWeaver]

[TestRelease]
[ConfirmRelease]
[UploadToCPAN]

[Prereqs]
DateTime::Set = 0
DateTime = 0
DateTime::Event::ICal = 0

[MetaResources]
repository.web = https://github.com/barcelonapm/Acme-PM-Barcelona
repository.url = https://github.com/barcelonapm/Acme-PM-Barcelona.git
repository.type = git
bugtracker.web = https://github.com/barcelonapm/Acme-PM-Barcelona/issues

lib/Acme/PM/Barcelona/12x5_ca.pod  view on Meta::CPAN


  # Acts in the play are "jornadas"
  $first_act = $don_mendo->jornadas(0);

  # Print the whole act
  $first_act->tell();

  # Just the lines for the main character
  print $first_act->lines_for_character('Mendo');

=head3 DateTime::Event::Klingon

Determine events of Klingon cultural significance.

  use DateTime;
  use DateTime::Event::Klingon qw/
      Heghlu'meH QaQ jajvam'a'
  /;

  $dt = DateTime->now;
  print 'Today ', Heghlu'meH QaQ jajvam'a'($dt)
      ? 'is' : 'is not',
      " a good day to die!\n";

=head3 Acme::Code::Police

Enforce rigorous coding standards.

  use Acme::Code::Police;

lib/Acme/PM/Barcelona/Meeting.pm  view on Meta::CPAN

use warnings;
use strict;

package Acme::PM::Barcelona::Meeting;
# ABSTRACT: When is the next meeting?
$Acme::PM::Barcelona::Meeting::VERSION = '0.06';
use base 'DateTime::Set';
use DateTime;
use DateTime::Event::ICal;


sub new {
    my $class = shift;

    # every last Thu of the month at 20:00
    my $self = DateTime::Event::ICal->recur(
        dtstart  => DateTime->now,
        freq     => 'monthly',
        byday    => [ "-1th" ],
        byhour   => [ 20 ],
        byminute => [ 0 ],
        bysecond => [ 0 ],
    );

    bless $self, $class;
}

lib/Acme/PM/Barcelona/Meeting.pm  view on Meta::CPAN


This module helps finding when the next Barcelona Perl Mongers meeting
will take place.

=head1 USAGE

=over 4

=item new

Creates a parent DateTime::Set object. All other methods are inherited.

=back

=head1 ACKNOWLEDGEMENTS

Barcelona Perl Mongers

=head1 AUTHOR

Alex Muntada <alexm@cpan.org>

t/meeting.t  view on Meta::CPAN

#!perl -T

use strict;
use warnings;
use Test::More tests => 2;

use DateTime;
use DateTime::Event::ICal;
use Acme::PM::Barcelona::Meeting;

{
    my $barcelona_pm = Acme::PM::Barcelona::Meeting->new();
    isa_ok( $barcelona_pm, 'Acme::PM::Barcelona::Meeting' );

    # every last Thu of the month at 20:00:00
    my $dt_set = DateTime::Event::ICal->recur(
        dtstart  => DateTime->now(),
        freq     => 'monthly',
        byday    => [ '-1th' ],
        byhour   => [ 20 ],
        byminute => [ 0 ],
        bysecond => [ 0 ],
    );

    is_deeply( $barcelona_pm, $dt_set, "next meeting verified" );
}



( run in 0.311 second using v1.01-cache-2.11-cpan-05444aca049 )