view release on metacpan or search on metacpan
123456789101112131415This 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
1234567891011121314151617181920212223242526#line 1
package
Module::Install;
# 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;
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
3637383940414243444546474849505152535455565758
*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
:
not:
inc/Module/Install/Metadata.pm view on Meta::CPAN
211212213214215216217218219220221222223224225226227228229230231
}
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
318319320321322323324325326327328329330331332333334335336337338
return
$self
->{
values
}->{no_index};
}
sub
read
{
my
$self
=
shift
;
$self
->include_deps(
'YAML::Tiny'
, 0 );
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
171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
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
218219220221222223224225226227228229230231232233234235236237238239240241
?
'[]'
: (
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
5678910111213141516171819202122232425
inc/Test/Base.pm view on Meta::CPAN
408409410411412413414415416417418419420421422423424425426427428
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
456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
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
568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604
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
630631632633634635636637638639640641642643644645646647648649650
}
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
78798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
$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
207208209210211212213214215216217218219220221222223224225226227FAIL
$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
519520521522523524525526527528529530531532533534535536537538
$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
963964965966967968969970971972973974975976977978979980981982#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
120112021203120412051206120712081209121012111212121312141215121612171218121912201221
$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
124112421243124412451246124712481249125012511252125312541255125612571258125912601261
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
212223242526272829303132333435363738394041our
$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
310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339DIAGNOSTIC
}
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
711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746
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
101112131415161718192021222324252627
-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