Acme-MetaSyntactic-daleks

 view release on metacpan or  search on metacpan

lib/Acme/MetaSyntactic/daleks.pm  view on Meta::CPAN


=head1 COPYRIGHT & LICENSE

Copyright 2007 SE<eacute>bastien Aperghis-Tramoni, all rights reserved.

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.

=cut

__DATA__
# names
A_Beautiful_Dalek
A_Clockwork_Dalek
A_Connecticut_Dalek_in_King_Arthur_s_Court
A_Connecticut_Yankee_in_King_Arthur_s_Dalek
A_Dalek_at_the_opera
A_Dalek_at_the_Races
A_Dalek_called_Wanda
A_Dalek_for_All_Seasons
A_Dalek_is_Born

t/ams-24data.t  view on Meta::CPAN

for my $file (@files) {

SKIP: {
        open my $fh, $file or do {
            skip "Can't open $file: $!", 1;
        };
        my ($fail, $in_data) = (0, 0);
        my @lines;

        while (<$fh>) {
            $in_data++ if /^__DATA__$/;
            next       if !$in_data;
            $fail++, push @lines, $.
                if /^#/ && !/^# ?(?:names(?: +[-\w]+)*|default)\s*$/;
        }
        is( $fail, 0, "__DATA__ section for $file" );
        diag "Failed lines: @lines" if @lines;
        close $fh;
    }
}

utils/update-module  view on Meta::CPAN

#!/usr/bin/perl
use strict;
use lib "lib";
use Acme::MetaSyntactic::daleks;

my $mod_path = $INC{"Acme/MetaSyntactic/daleks.pm"};
open(MODULE, $mod_path) or die "can't read '$mod_path': $!";
my @file = grep { /^package/ .. /^__DATA__/ } <MODULE>;
close(MODULE);

push @file, map { "$_\n" } "# names", Acme::MetaSyntactic::daleks->remote_list();

open(MODULE, ">$mod_path") or die "can't write '$mod_path': $!";
print MODULE @file;
close(MODULE);



( run in 0.521 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )