Acme-Albed

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
This is Perl module Acme::Albed.
 
INSTALLATION
 
Acme::Albed installation is straightforward. If your CPAN shell is set up,
you should just be able to do
 
    % cpan Acme::Albed
 
Download it, unpack it, then build it as per the usual:
 
    % perl Makefile.PL
    % make && make test
 
Then install it:

inc/Module/Install.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
22
23
24
25
26
#line 1
 
# For any maintainers:
# The load order for Module::Install is a bit magic.
# It goes something like this...
#
# IF ( host has Module::Install installed, creating author mode ) {
#     1. Makefile.PL calls "use inc::Module::Install"
#     2. $INC{inc/Module/Install.pm} set to installed version of inc::Module::Install
#     3. The installed version of inc::Module::Install loads
#     4. inc::Module::Install calls "require Module::Install"
#     5. The ./inc/ version of Module::Install loads
# } ELSE {
#     1. Makefile.PL calls "use inc::Module::Install"
#     2. $INC{inc/Module/Install.pm} set to ./inc/ version of Module::Install
#     3. The ./inc/ version of Module::Install loads
# }
 
use 5.005;
use strict 'vars';
 
use vars qw{$VERSION $MAIN};
BEGIN {
        # All Module::Install core packages now require synchronised versions.
        # This will be used to ensure we don't accidentally load old or

inc/Module/Install.pm  view on Meta::CPAN

36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
        *inc::Module::Install::VERSION = *VERSION;
        @inc::Module::Install::ISA     = __PACKAGE__;
 
}
 
 
 
 
 
# Whether or not inc::Module::Install is actually loaded, the
# $INC{inc/Module/Install.pm} is what will still get set as long as
# the caller loaded module this in the documented manner.
# If not set, the caller may NOT have loaded the bundled version, and thus
# they may not have a MI version that works with the Makefile.PL. This would
# result in false errors or unexpected behaviour. And we don't want that.
my $file = join( '/', 'inc', split /::/, __PACKAGE__ ) . '.pm';
unless ( $INC{$file} ) { die <<"END_DIE" }
 
Please invoke ${\__PACKAGE__} with:
 
        use inc::${\__PACKAGE__};
 
not:

inc/Module/Install/Metadata.pm  view on Meta::CPAN

211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
        }
 
        return 1;
}
 
sub all_from {
        my ( $self, $file ) = @_;
 
        unless ( defined($file) ) {
                my $name = $self->name or die(
                        "all_from called with no args without setting name() first"
                );
                $file = join('/', 'lib', split(/-/, $name)) . '.pm';
                $file =~ s{.*/}{} unless -e $file;
                unless ( -e $file ) {
                        die("all_from cannot find $file from $name");
                }
        }
        unless ( -f $file ) {
                die("The path '$file' does not exist, or is not a file");
        }

inc/Module/Install/Metadata.pm  view on Meta::CPAN

318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
        return $self->{values}->{no_index};
}
 
sub read {
        my $self = shift;
        $self->include_deps( 'YAML::Tiny', 0 );
 
        require YAML::Tiny;
        my $data = YAML::Tiny::LoadFile('META.yml');
 
        # Call methods explicitly in case user has already set some values.
        while ( my ( $key, $value ) = each %$data ) {
                next unless $self->can($key);
                if ( ref $value eq 'HASH' ) {
                        while ( my ( $module, $version ) = each %$value ) {
                                $self->can($key)->($self, $module => $version );
                        }
                } else {
                        $self->can($key)->($self, $value);
                }
        }

inc/Spiffy.pm  view on Meta::CPAN

171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
    for my $base_class (@{"${class}::ISA"}) {
        push @bases, @{all_my_bases($base_class)};
    }
    my $used = {};
    $bases_map->{$class} = [grep {not $used->{$_}++} @bases];
}
 
my %code = (
    sub_start =>
      "sub {\n",
    set_default =>
      "  \$_[0]->{%s} = %s\n    unless exists \$_[0]->{%s};\n",
    init =>
      "  return \$_[0]->{%s} = do { my \$self = \$_[0]; %s }\n" .
      "    unless \$#_ > 0 or defined \$_[0]->{%s};\n",
    weak_init =>
      "  return do {\n" .
      "    \$_[0]->{%s} = do { my \$self = \$_[0]; %s };\n" .
      "    Scalar::Util::weaken(\$_[0]->{%s}) if ref \$_[0]->{%s};\n" .
      "    \$_[0]->{%s};\n" .
      "  } unless \$#_ > 0 or defined \$_[0]->{%s};\n",
    return_if_get =>
      "  return \$_[0]->{%s} unless \$#_ > 0;\n",
    set =>
      "  \$_[0]->{%s} = \$_[1];\n",
    weaken =>
      "  Scalar::Util::weaken(\$_[0]->{%s}) if ref \$_[0]->{%s};\n",
    sub_end =>
      "  return \$_[0]->{%s};\n}\n",
);
 
sub field {
    my $package = caller;
    my ($args, @values) = do {

inc/Spiffy.pm  view on Meta::CPAN

218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
        ? '[]'
        : (ref($default) eq 'HASH' and not keys %$default )
          ? '{}'
          : default_as_code($default);
 
    my $code = $code{sub_start};
    if ($args->{-init}) {
        my $fragment = $args->{-weak} ? $code{weak_init} : $code{init};
        $code .= sprintf $fragment, $field, $args->{-init}, ($field) x 4;
    }
    $code .= sprintf $code{set_default}, $field, $default_string, $field
      if defined $default;
    $code .= sprintf $code{return_if_get}, $field;
    $code .= sprintf $code{set}, $field;
    $code .= sprintf $code{weaken}, $field, $field
      if $args->{-weak};
    $code .= sprintf $code{sub_end}, $field;
 
    my $sub = eval $code;
    die $@ if $@;
    no strict 'refs';
    *{"${package}::$field"} = $sub;
    return $code if defined wantarray;
}

inc/Test/Base.pm  view on Meta::CPAN

5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use 5.006001;
use Spiffy 0.30 -Base;
use Spiffy ':XXX';
our $VERSION = '0.59';
 
my @test_more_exports;
BEGIN {
    @test_more_exports = qw(
        ok isnt like unlike is_deeply cmp_ok
        skip todo_skip pass fail
        eq_array eq_hash eq_set
        plan can_ok isa_ok diag
        use_ok
        $TODO
    );
}
 
use Test::More import => \@test_more_exports;
use Carp;
 
our @EXPORT = (@test_more_exports, qw(

inc/Test/Base.pm  view on Meta::CPAN

408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
    croak $@ if $@;
    return $spec;
}
 
sub _block_list_init {
    my $spec = $self->spec;
    $spec = $self->_pre_eval($spec);
    my $cd = $self->block_delim;
    my @hunks = ($spec =~ /^(\Q${cd}\E.*?(?=^\Q${cd}\E|\z))/msg);
    my $blocks = $self->_choose_blocks(@hunks);
    $self->block_list($blocks); # Need to set early for possible filter use
    my $seq = 1;
    for my $block (@$blocks) {
        $block->blocks_object($self);
        $block->seq_num($seq++);
    }
    return $blocks;
}
 
sub _choose_blocks {
    my $blocks = [];

inc/Test/Base.pm  view on Meta::CPAN

456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
    my $block = $self->block_class->new;
    $hunk =~ s/\A\Q${cd}\E[ \t]*(.*)\s+// or die;
    my $name = $1;
    my @parts = split /^\Q${dd}\E +\(?(\w+)\)? *(.*)?\n/m, $hunk;
    my $description = shift @parts;
    $description ||= '';
    unless ($description =~ /\S/) {
        $description = $name;
    }
    $description =~ s/\s*\z//;
    $block->set_value(description => $description);
     
    my $section_map = {};
    my $section_order = [];
    while (@parts) {
        my ($type, $filters, $value) = splice(@parts, 0, 3);
        $self->_check_reserved($type);
        $value = '' unless defined $value;
        $filters = '' unless defined $filters;
        if ($filters =~ /:(\s|\z)/) {
            croak "Extra lines not allowed in '$type' section"
              if $value =~ /\S/;
            ($filters, $value) = split /\s*:(?:\s+|\z)/, $filters, 2;
            $value = '' unless defined $value;
            $value =~ s/^\s*(.*?)\s*$/$1/;
        }
        $section_map->{$type} = {
            filters => $filters,
        };
        push @$section_order, $type;
        $block->set_value($type, $value);
    }
    $block->set_value(name => $name);
    $block->set_value(_section_map => $section_map);
    $block->set_value(_section_order => $section_order);
    return $block;
}
 
sub _spec_init {
    return $self->_spec_string
      if $self->_spec_string;
    local $/;
    my $spec;
    if (my $spec_file = $self->_spec_file) {
        open FILE, $spec_file or die $!;

inc/Test/Base.pm  view on Meta::CPAN

568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
    return;
}
 
sub block_accessor() {
    my $accessor = shift;
    no strict 'refs';
    return if defined &$accessor;
    *$accessor = sub {
        my $self = shift;
        if (@_) {
            Carp::croak "Not allowed to set values for '$accessor'";
        }
        my @list = @{$self->{$accessor} || []};
        return wantarray
        ? (@list)
        : $list[0];
    };
}
 
block_accessor 'name';
block_accessor 'description';
Spiffy::field 'seq_num';
Spiffy::field 'is_filtered';
Spiffy::field 'blocks_object';
Spiffy::field 'original_values' => {};
 
sub set_value {
    no strict 'refs';
    my $accessor = shift;
    block_accessor $accessor
      unless defined &$accessor;
    $self->{$accessor} = [@_];
}
 
sub run_filters {
    my $map = $self->_section_map;
    my $order = $self->_section_order;

inc/Test/Base.pm  view on Meta::CPAN

630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
            }
            else {
                my $filter_object = $self->blocks_object->filter_class->new;
                die "Can't find a function or method for '$filter' filter\n"
                  unless $filter_object->can($filter);
                $filter_object->current_block($self);
                @value = $filter_object->$filter(@value);
            }
            # Set the value after each filter since other filters may be
            # introspecting.
            $self->set_value($type, @value);
        }
    }
    $self->is_filtered(1);
}
 
sub _get_filters {
    my $type = shift;
    my $string = shift || '';
    $string =~ s/\s*(.*?)\s*/$1/;
    my @filters = ();

inc/Test/Builder.pm  view on Meta::CPAN

78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    $Test ||= $class->create;
    return $Test;
}
 
#line 139
 
sub create {
    my $class = shift;
 
    my $self = bless {}, $class;
    $self->reset;
 
    return $self;
}
 
#line 168
 
sub child {
    my( $self, $name ) = @_;
 
    if( $self->{Child_Name} ) {
        $self->croak("You already have a child named ($self->{Child_Name}) running");
    }
 
    my $child = bless {}, ref $self;
    $child->reset;
 
    # Add to our indentation
    $child->_indent( $self->_indent . '    ' );
    $child->{$_} = $self->{$_} foreach qw{Out_FH Todo_FH Fail_FH};
 
    # This will be reset in finalize. We do this here lest one child failure
    # cause all children to fail.
    $child->{Child_Error} = $?;
    $?                    = 0;
    $child->{Parent}      = $self;
    $child->{Name}        = $name || "Child of " . $self->name;
    $self->{Child_Name}   = $child->name;
    return $child;
}

inc/Test/Builder.pm  view on Meta::CPAN

207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
FAIL
        $self->parent->{In_Destroy} = 1;
        $self->parent->ok(0, $name);
    }
}
 
#line 336
 
our $Level;
 
sub reset {    ## no critic (Subroutines::ProhibitBuiltinHomonyms)
    my($self) = @_;
 
    # We leave this a global because it has to be localized and localizing
    # hash keys is just asking for pain.  Also, it was documented.
    $Level = 1;
 
    $self->{Name}         = $0;
    $self->is_passing(1);
    $self->{Ending}       = 0;
    $self->{Have_Plan}    = 0;

inc/Test/Builder.pm  view on Meta::CPAN

519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
    $self->is_passing(0) unless $test || $self->in_todo;
 
    # Check that we haven't violated the plan
    $self->_check_is_passing_plan();
 
    return $test ? 1 : 0;
}
 
 
# Check that we haven't yet violated the plan and set
# is_passing() accordingly
sub _check_is_passing_plan {
    my $self = shift;
 
    my $plan = $self->has_plan;
    return unless defined $plan;        # no plan yet defined
    return unless $plan !~ /\D/;        # no numeric plan
    $self->is_passing(0) if $plan < $self->{Curr_Test};
}

inc/Test/Builder.pm  view on Meta::CPAN

963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
#line 1389
 
sub _try {
    my( $self, $code, %opts ) = @_;
 
    my $error;
    my $return;
    {
        local $!;               # eval can mess up $!
        local $@;               # don't set $@ in the test
        local $SIG{__DIE__};    # don't trip an outside DIE handler.
        $return = eval { $code->() };
        $error = $@;
    }
 
    die $error if $error and $opts{die_on_fail};
 
    return wantarray ? ( $return, $error ) : $return;
}

inc/Test/Builder.pm  view on Meta::CPAN

1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
    $self->_open_testhandles;
 
    # Set everything to unbuffered else plain prints to STDOUT will
    # come out in the wrong order from our own prints.
    _autoflush($Testout);
    _autoflush( \*STDOUT );
    _autoflush($Testerr);
    _autoflush( \*STDERR );
 
    $self->reset_outputs;
 
    return;
}
 
sub _open_testhandles {
    my $self = shift;
 
    return if $self->{Opened_Testhandles};
 
    # We dup STDOUT and STDERR so people can change them in their

inc/Test/Builder.pm  view on Meta::CPAN

1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
            binmode $dst, join " ", map ":$_", @src_layers if @src_layers;
        }
    );
 
    return;
}
 
#line 1857
 
sub reset_outputs {
    my $self = shift;
 
    $self->output        ($Testout);
    $self->failure_output($Testerr);
    $self->todo_output   ($Testout);
 
    return;
}
 
#line 1883

inc/Test/More.pm  view on Meta::CPAN

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
our $VERSION = '0.94';
$VERSION = eval $VERSION;    ## no critic (BuiltinFunctions::ProhibitStringyEval)
 
our @ISA    = qw(Test::Builder::Module);
our @EXPORT = qw(ok use_ok require_ok
  is isnt like unlike is_deeply
  cmp_ok
  skip todo todo_skip
  pass fail
  eq_array eq_hash eq_set
  $TODO
  plan
  done_testing
  can_ok isa_ok new_ok
  diag note explain
  subtest
  BAIL_OUT
);
 
#line 164

inc/Test/More.pm  view on Meta::CPAN

310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
DIAGNOSTIC
 
    }
 
    return $ok;
}
 
sub _eval {
    my( $code, @args ) = @_;
 
    # Work around oddities surrounding resetting of $@ by immediately
    # storing it.
    my( $sigdie, $eval_result, $eval_error );
    {
        local( $@, $!, $SIG{__DIE__} );    # isolate eval
        $eval_result = eval $code;              ## no critic (BuiltinFunctions::ProhibitStringyEval)
        $eval_error  = $@;
        $sigdie      = $SIG{__DIE__} || undef;
    }
    # make sure that $code got a chance to set $SIG{__DIE__}
    $SIG{__DIE__} = $sigdie if defined $sigdie;
 
    return( $eval_result, $eval_error );
}
 
#line 875
 
sub require_ok ($) {
    my($module) = shift;
    my $tb = Test::More->builder;

inc/Test/More.pm  view on Meta::CPAN

711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
        pop @Data_Stack if $ok;
 
        last unless $ok;
    }
 
    return $ok;
}
 
#line 1572
 
sub eq_set {
    my( $a1, $a2 ) = @_;
    return 0 unless @$a1 == @$a2;
 
    no warnings 'uninitialized';
 
    # It really doesn't matter how we sort them, as long as both arrays are
    # sorted with the same algorithm.
    #
    # Ensure that references are not accidentally treated the same as a
    # string containing the reference.
    #
    # Have to inline the sort routine due to a threading/sort bug.
    # See [rt.cpan.org 6782]
    #
    # I don't know how references would be sorted so we just don't sort
    # them.  This means eq_set doesn't really work with refs.
    return eq_array(
        [ grep( ref, @$a1 ), sort( grep( !ref, @$a1 ) ) ],
        [ grep( ref, @$a2 ), sort( grep( !ref, @$a2 ) ) ],
    );
}
 
#line 1774
 
1;

xt/01_podspell.t  view on Meta::CPAN

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
        -x "$path/spell"  and $spell_cmd="spell", last;
        -x "$path/ispell" and $spell_cmd="ispell -l", last;
        -x "$path/aspell" and $spell_cmd="aspell list", last;
}
$ENV{SPELL_CMD} and $spell_cmd = $ENV{SPELL_CMD};
$spell_cmd or plan skip_all => "no spell/ispell/aspell";
#diag "spell_cmd = $spell_cmd";
  
$ENV{LANG} = 'C';
add_stopwords(map { split /[\s\:\-]/ } <DATA>);
set_spell_cmd($spell_cmd);
all_pod_files_spelling_ok('lib');
__DATA__
haoyayoi
st.hao.yayoi@gmail.com
Acme::Albed
Albedian
FinalFantasy



( run in 0.289 second using v1.01-cache-2.11-cpan-94b05bcf43c )