Acme-PM-Paris-Meetings

 view release on metacpan or  search on metacpan

lib/Acme/PM/Paris/Meetings.pm  view on Meta::CPAN

82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
sub next_meeting
{
    my $count = shift(@_) || -1;
 
    unless (defined $iterator) {
        $iterator = recurrence()->iterator;
    }
 
    if (wantarray && $count >= 1) {
        map { $iterator->next()->strftime("%A %d/%m/%Y %Hh%M") } 1..$count;
    } else {
        $iterator->next()->strftime("%A %d/%m/%Y %Hh%M")
    }
}
 
 
=head2 ical
 
Returns the current ICal expression for the next Paris.pm meeting.

script/paris-pm  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/perl
 
use strict;
 
if (@ARGV) {
    if ($ARGV[0] =~ /^(?:-V|--version)$/) {
        print "Acme::PM::Paris::Meetings $Acme::PM::Paris::Meetings::VERSION\n";
    } elsif ($ARGV[0] =~ /^-([1-9]\d*)$/) {
        print map { "$_\n" } next_meeting($1);
    } else {
        print "syntaxe: paris-pm [-V|--version] [-<nombre>]\n";
        exit 2;
    }
} else {
    print next_meeting, "\n";
}
 
__END__
=head1 NAME



( run in 0.256 second using v1.01-cache-2.11-cpan-a5abf4f5562 )