Acme-Machi
view release on metacpan or search on metacpan
configure_requires => {
'Module::Build' => 0,
},
build_requires => {
'Test::More' => 0.62,
},
requires => {
'IO::Dir' => 1.10,
'File::Spec' => 3.39_02,
'File::Basename' => 2.84,
'Data::Dumper' => 2.135_06,
'Cwd' => 3.39_02,
'Carp' => 1.26,
'namespace::autoclean' => 0.28,
},
add_to_cleanup => [ 'Acme-Machi-*' ],
create_makefile_pl => 'traditional',
);
$builder->create_build_script();
},
"configure" : {
"requires" : {
"Module::Build" : "0"
}
},
"runtime" : {
"requires" : {
"Carp" : "1.26",
"Cwd" : "3.3902",
"Data::Dumper" : "2.13506",
"File::Basename" : "2.84",
"File::Spec" : "3.3902",
"IO::Dir" : "1.1",
"namespace::autoclean" : "0.28"
}
}
},
"provides" : {
"Acme::Machi" : {
"file" : "lib/Acme/Machi.pm",
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Acme-Machi
provides:
Acme::Machi:
file: lib/Acme/Machi.pm
version: v1.0.1
requires:
Carp: '1.26'
Cwd: '3.3902'
Data::Dumper: '2.13506'
File::Basename: '2.84'
File::Spec: '3.3902'
IO::Dir: '1.1'
namespace::autoclean: '0.28'
resources:
license: http://opensource.org/licenses/artistic-license-2.0.php
version: v1.00.1
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
Makefile.PL view on Meta::CPAN
# Note: this file was auto-generated by Module::Build::Compat version 0.4003
use ExtUtils::MakeMaker;
WriteMakefile
(
'NAME' => 'Acme::Machi',
'PREREQ_PM' => {
'namespace::autoclean' => '0.28',
'File::Spec' => '3.3902',
'Carp' => '1.26',
'Data::Dumper' => '2.13506',
'Test::More' => '0.62',
'Cwd' => '3.3902',
'File::Basename' => '2.84',
'IO::Dir' => '1.1'
},
'PL_FILES' => {},
'INSTALLDIRS' => 'site',
'VERSION_FROM' => 'lib/Acme/Machi.pm',
'EXE_FILES' => []
)
lib/Acme/Machi.pm view on Meta::CPAN
package Acme::Machi v1.00.1 {
use v5.16.2;
use strict;
use warnings;
use IO::Dir;
use File::Spec;
use File::Basename;
use Data::Dumper;
use Cwd;
use Carp;
#import CPAN libs
use namespace::autoclean;
=head1 NAME
Machi - Awesome Machi here!
lib/Acme/Machi.pm view on Meta::CPAN
my $words_list = $_[0]{Words};
($_[1] // *STDOUT)->print( $_[0]->name(),": ", $words_list->[int(rand($#$words_list))], "\n");
}
=head2 search_file_from
Using BFS or DFS to search the target from certain directory.
Return: a two-element list:
the first element is boolean value denoting whether the target was found or not.
the second element is the result string outputed from the core module, Data::Dumper.
You may get to know files distribution even better after printing the string.
=cut
sub search_file_from {
ref $_[0] || croak "Oops! Cannot ask non-human to search!";
my ($target, $dir, $RESP) = @_[1,2,3];
my $obj = File::Spec->catfile(getcwd, $target);
my $s_dir = File::Spec->catfile(getcwd, $dir);
my $push_front_back = ($_[0]->habit() eq 'DFS')?
sub {
lib/Acme/Machi.pm view on Meta::CPAN
my $dh = IO::Dir->new("$np");
my $npp;
foreach ($dh->read()) {;
$npp = File::Spec->catfile($np,$_);
($obj eq $npp) && ($found = 1);
return 1 if $RESP;
(m/\A\.{1,2}?\z/aa) || $push_front_back->(\@queue, [ $npp, $nd->{$key} ]);
}
}
}
print Data::Dumper->Dump([\$data],[qw% *data %]);
$found;
}
=head1 AUTHOR
Machi Amayadori, C<< <Eosin at Syaro.Cafe> >>
=head1 BUGS
( run in 0.969 second using v1.01-cache-2.11-cpan-a5abf4f5562 )