Incorrect search filter: invalid characters - *.p[ml]
AI-MicroStructure

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

                     END OF TERMS AND CONDITIONS

        Appendix: How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to humanity, the best way to achieve this is to make it
free software which everyone can redistribute and change under these
terms.

  To do so, attach the following notices to the program.  It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>

MANIFEST  view on Meta::CPAN

bin/getnice
bin/leo
bin/linksearch
bin/linksearch~
bin/localfiles
bin/micro
bin/micro-dict
bin/micro-dict~
bin/micro-leo
bin/micro-relation
bin/micro-relation-test
bin/micro-rename
bin/micro-sense
bin/micro-soundex
bin/micro-steemer
bin/micro-wiki
bin/micro-wnet
bin/micrownet
bin/national
bin/newssearch
bin/park.pm

MANIFEST  view on Meta::CPAN

t/canned/docs/wolfram/NoncommutativeGeometry.html
t/canned/docs/wolfram/NumberGuessing.html
t/canned/docs/wolfram/Numbers.html
t/canned/docs/wolfram/Runs.html
t/canned/docs/wolfram/ScalarAlgebra.html
t/canned/docs/wolfram/Springer.Scheper.&.Fiechter.(2000).Advances.in.biochemical.engineering.biotechnology.History.of.modern.biotechnology.1.v.69.Springer.pdf
t/canned/docs/wolfram/Springer.statistical_methods_for_biostatistics_hardle_2007_springer.pdf
t/canned/docs/wolfram/TheoremProving.html
t/canned/docs/wolfram/mathworld_index.html
t/canned/sample.tdm
t/micro-test.pl
t/t/001.t
t/t/0010.t
t/t/0011.t
t/t/0012.t
t/t/0013.t
t/t/002.t
t/t/003.t
t/t/004.t
t/t/005.t
t/t/006.t
t/t/007.t
t/t/008.t
t/t/009.t
t/t/basedep.dodo.t
t/t/basedep.santex.t
t/t/load-prerequest.t
t/t/micro-test

Makefile.PL  view on Meta::CPAN

    "bin/getnice",
    "bin/leo",
    "bin/linksearch",
    "bin/linksearch~",
    "bin/localfiles",
    "bin/micro",
    "bin/micro-dict",
    "bin/micro-dict~",
    "bin/micro-leo",
    "bin/micro-relation",
    "bin/micro-relation-test",
    "bin/micro-rename",
    "bin/micro-sense",
    "bin/micro-soundex",
    "bin/micro-steemer",
    "bin/micro-wiki",
    "bin/micro-wnet",
    "bin/micrownet",
    "bin/national",
    "bin/newssearch",
    "bin/park.pm",

Makefile.PL  view on Meta::CPAN

    "Statistics::Contingency" => 0,
    "Statistics::Descriptive" => 0,
    "Statistics::Distributions::Ancova" => 0,
    "Statistics::MVA::BayesianDiscrimination" => 0,
    "Statistics::MVA::HotellingTwoSample" => 0,
    "Storable" => 0,
    "Storable::CouchDB" => 0,
    "Sysadm::Install" => 0
  },
  "VERSION" => "0.20",
  "test" => {
    "TESTS" => "t/t/*.t"
  }
);


my %FallbackPrereqs = (
  "AI::Categorizer" => 0,
  "AI::Categorizer::Document" => 0,
  "AI::Categorizer::KnowledgeSet" => 0,
  "AI::Categorizer::Learner::NaiveBayes" => 0,

README.md  view on Meta::CPAN

  $ micro new biological_process

  $ for i in `micro structures`; do
  $ for y in `micro all $i `; do
  $ echo "$i=$y";
  $ micro new $y;
  $ done
  $ done

  #!!!!!###Hard cpu to expect ### make sure couch is on   ######  or disable the store methode in micro-wiki and print $doc or consume otherweise
  # test as single before you loope 
  
  $ micro-wiki ufo
  
  # proceed

  $ for i in `micro structures`; do
  $ for y in `micro all $i `; do
  $ echo "$i=$y";
  $ micro-wiki $y;
  $ done

bin/chrono  view on Meta::CPAN

my @line = map{try{$encoder->decode($_)};}<$info>;
close $info;


my $i = $#line;
print $i;
my $ret = {};
foreach(@line){
my $duration  = $_->{_end} -$_->{_start};

my @test = split /\/|\.| |-/,$_->{name};


   $ret->{$_->{application}}->{$_->{name}}  =     [$ret->{$_->{application}}->{$_->{name}}  ? 
      $ret->{$_->{application}}->{$_->{name}} + 1 : 1 ,$duration];

}

p $ret;
1;
__DATA__

bin/micro-dict  view on Meta::CPAN


stop=$(perl -MAI::MicroStructure::WordBlacklist -E  "my \$s=AI::MicroStructure::WordBlacklist::getStopWords('de'); my @s = keys %\$s; print join('|',@s);")
IFS=$'\n';

$cmd $1 |   tr A-Z a-z |                # Convert to lowercase.
        tr ' ' '_' |             # New: change spaces to newlines.
       #tr -cd '\012[a-z][0-9]' |   #  Get rid of everything
                                    #+ non-alphanumeric (in orig. script).
        tr -c '\012a-z'  '\012' |   #  Rather than deleting non-alpha
        egrep -v '^#' |              # Delete lines starting with hashmark.
        egrep -v "^[ ]*([A-Za-z][A-Za-z]|[A-Za-z])$" | egrep -v "^$" | egrep -v -i "^ (denkbarer|ganze|bez|ver�ffentlichtes|uns�gliches|ungew�hnliche|vollstaendig|erstem|Inf.|titel|unsaeglichem|beforehand|denkbares|yours|contains|gedurft|seithe...


 stop=$(perl -MAI::MicroStructure::WordBlacklist -E  "my \$s=AI::MicroStructure::WordBlacklist::getStopWords('de'); my @s = keys %\$s; print join('|',@s);")

 cat /tmp/micro-dict.tmp | sort -n | egrep -v "^.*.[\ ].*.[1-9][\:][\ ][\ ]($stop)";


 #if [ !  "$(echo  "$stop" | egrep -i zzzzzzzzzzzz)" ]; then  echo cool; fi


bin/micro-steemer  view on Meta::CPAN

#!/bin/bash
IFS_BAK=$IFS;
IFS=$'\n';

mkdir -p /tmp/test/pages;
pdftotext "$1" "$2";
#pdftohtml -i "$1" "$2.html";
#mv "$2" /tmp/test/pages;
#mv "$2.*.html" /tmp/test/pages;
#mv "$2.*.png" /tmp/test/pages;
#mv "$2.*.jpg" /tmp/test/pages;

FROM="$1"
TO="$2"

#awk '/MARKER/{n++}{print > ".out" n }' "$TO.txt";

bin/micro-wiki  view on Meta::CPAN


our $doc ={};
our @links;
our $linkdata = {};
our $result;
our $odir = "";

    
my $url = $ARGV[0];
my @inx;
my @test;
my $search="";

my $TOP="wikipedia";
my $carry = {count=>0,max=>0};


sub nicefy { return reverse sort {length($a) <=> length($b)}@_ }
sub quantify {my	 $base = {}; map{$base->{$_} = $base->{$_}?$base->{$_}+1:1}@_;  return $base; }#return reverse sort {length($a) <=> length($b)}@_ }


lib/AI/MicroStructure.pm  view on Meta::CPAN

   for my $cat ( "AI::MicroStructure::$structure"->categories(), ':all' ) {
   push @micros,
   [ "AI::MicroStructure::$structure"->new( category => $cat ),$cat];
   }
   }
   else {
   push @micros, ["AI::MicroStructure::$structure"->new(),''];
   }
}
my  $all ={};
for my $test (@micros) {
   my $micro = $test->[0];
   my %items;
   my $items = $micro->name(0);
   $items{$_}++ for $micro->name(0);
   my $key=sprintf("%s",$micro->structure);
   $all->{$key}=[$test->[1],$micro->name($items)];
}
 return $all;
}
sub save_cat {
  my $self = shift;
  my $data = shift;
  my $dat;
  my $ret = "";
  foreach my $key(sort keys %{$data} ) {
   next unless($_);

lib/AI/MicroStructure/WordBlacklist.pm  view on Meta::CPAN

our ours ourselves out outside over overall own
p particular particularly per perhaps placed please plus possible presumably probably
provides q que quite qv r rather rd re really reasonably regarding regardless regards
relatively respectively right s said same saw say saying says second secondly see seeing seem seemed seeming seems seen self selves sensible sent serious seriously seven
several shall she should shouldn't since six
so some somebody somehow someone something sometime sometimes somewhat somewhere soon sorry specified specify specifying still sub such sup sure t t's take taken tell tends th than thank thanks thanx that that's thats the their theirs them themselves...
qqq rrr sss ttt uuu vvv www xxx yyy zzz .... unsere ihrer uns wurde wer gegen diesem bis nur wieder unserem einer war man bei wir einen vom einem unter jeder werden wie als durch zum hat vor unseres email bel ihnen unseren bzw lieber uft kommen nicht...
anderweitigen anderweitiger anderweitiges anerkannt anerkannte anerkannter anerkanntes anfangen anfing angefangen angesetze angesetzt angesetzten angesetzter ans anscheinend ansetzen ansonst ansonsten anstatt anstelle arbeiten auch auf aufgehört aufg...
bessere besserem besseren besserer besseres bestehen besteht bestenfalls bestimmt bestimmte bestimmtem bestimmten bestimmter bestimmtes betraechtlich betraechtliche betraechtlichem betraechtlichen betraechtlicher betraechtliches betreffend betreffend...
diesseitiges diesseits dinge dir direkt direkte direkten direkter doch doppelt dort dorther dorthin dran drauf drei dreißig drin dritte drueber drum drunter drüber du dunklen durch durchaus durchweg durchwegs durfte durften dürfen dürfte eben ebenfal...
entsprechender entsprechendes entweder er ergo ergänze ergänzen ergänzte ergänzten erhalten erhielt erhielten erhält erneut erst erste erstem ersten erster erstere ersterem ersteren ersterer ersteres erstes eröffne eröffnen eröffnet eröffnete eröffne...
häufige häufigem häufigen häufiger häufigere häufigeren häufigerer häufigeres höchst höchstens ich igitt ihm ihn ihnen ihr ihre ihrem ihren ihrer ihres ihretwegen im immer immerhin immerwaehrend immerwaehrende immerwaehrendem immerwaehrenden immerwae...
jeglichen jeglicher jegliches jemals jemand jene jenem jenen jener jenes jenseitig jenseitigem jenseitiger jenseits jetzt jährig jährige jährigem jährigen jähriges kaeumlich kam kann kannst kaum kein keine keinem keinen keiner keinerlei keines keines...
naechste naemlich nahm naturgemaess naturgemaeß naturgemäss naturgemäß natürlich neben nebenan nehmen nein neu neue neuem neuen neuer neuerdings neuerlich neuerliche neuerlichem neuerlicher neuerliches neues neulich neun nicht nichts nichtsdestotrotz...
seine seinem seinen seiner seines seit seitdem seite seiten seither selbe selben selber selbst selbstredend selbstredende selbstredendem selbstredenden selbstredender selbstredendes seltsamerweise senke senken senkt senkte senkten setzen setzt setzte...
unmaßgeblichem unmaßgeblichen unmaßgeblicher unmaßgebliches unmoeglich unmoegliche unmoeglichem unmoeglichen unmoeglicher unmoegliches unmöglich unmögliche unmöglichen unmöglicher unnötig uns unsaeglich unsaegliche unsaeglichem unsaeglichen unsaeglic...
vollends vollstaendig vollstaendige vollstaendigem vollstaendigen vollstaendiger vollstaendiges vollständig vollständige vollständigem vollständigen vollständiger vollständiges vom von vor voran vorbei vorgestern vorher vorherig vorherige vorherigem ...
würde würden während währenddessen wär wäre wären x übel über überall überallhin überaus überdies überhaupt übermorgen üblicherweise übrig übrigens z.B. zahlreich zahlreichem zahlreicher zB zb. zehn zeitweise zeitweisem zeitweisen zeitweiser ziehen z...
return \%stoplist;
}
else {
my %stoplist = map { ( $_, 1 ) } qw(
a able about above according accordingly across actually after afterwards again against aint all allow allows almost alone along already also although always am among amongst an and another any anybody anyhow anyone anything anyway anyways anywhere a...
b be became because become becomes becoming been before beforehand behind being believe below beside besides best better between beyond both brief but by
c came can cannot cant cant cause causes certain certainly changes clearly cmon co com come comes concerning consequently consider considering contain containing contains corresponding could couldnt course cs currently
d definitely described despite did didnt different do does doesnt doing done dont down downwards during
e each edu eg eight either else elsewhere enough entirely especially et etc even ever every everybody everyone everything everywhere ex exactly example except

lib/AI/MicroStructure/WordBlacklist.pm  view on Meta::CPAN

because as until while of at by for with about against between
into through during before after above below to from up down in
out on off over under again further then once here there when
where why how all any both each few more most other some such
no nor not only own same so than too very
a a's able about above according accordingly across actually after afterwards again against ain't all allow allows almost alone along already also although always am among amongst an and another any anybody anyhow anyone anything anyway anyways anywh...
qqq rrr sss ttt uuu vvv www xxx yyy zzz .... unsere ihrer uns wurde wer gegen diesem bis nur wieder unserem einer war man bei wir einen vom einem unter jeder werden wie als durch zum hat vor unseres email bel ihnen unseren bzw lieber uft kommen nicht...
anderweitigen anderweitiger anderweitiges anerkannt anerkannte anerkannter anerkanntes anfangen anfing angefangen angesetze angesetzt angesetzten angesetzter ans anscheinend ansetzen ansonst ansonsten anstatt anstelle arbeiten auch auf aufgehört aufg...
bessere besserem besseren besserer besseres bestehen besteht bestenfalls bestimmt bestimmte bestimmtem bestimmten bestimmter bestimmtes betraechtlich betraechtliche betraechtlichem betraechtlichen betraechtlicher betraechtliches betreffend betreffend...
diesseitiges diesseits dinge dir direkt direkte direkten direkter doch doppelt dort dorther dorthin dran drauf drei dreißig drin dritte drueber drum drunter drüber du dunklen durch durchaus durchweg durchwegs durfte durften dürfen dürfte eben ebenfal...
entsprechender entsprechendes entweder er ergo ergänze ergänzen ergänzte ergänzten erhalten erhielt erhielten erhält erneut erst erste erstem ersten erster erstere ersterem ersteren ersterer ersteres erstes eröffne eröffnen eröffnet eröffnete eröffne...
häufige häufigem häufigen häufiger häufigere häufigeren häufigerer häufigeres höchst höchstens ich igitt ihm ihn ihnen ihr ihre ihrem ihren ihrer ihres ihretwegen im immer immerhin immerwaehrend immerwaehrende immerwaehrendem immerwaehrenden immerwae...
jeglichen jeglicher jegliches jemals jemand jene jenem jenen jener jenes jenseitig jenseitigem jenseitiger jenseits jetzt jährig jährige jährigem jährigen jähriges kaeumlich kam kann kannst kaum kein keine keinem keinen keiner keinerlei keines keines...
naechste naemlich nahm naturgemaess naturgemaeß naturgemäss naturgemäß natürlich neben nebenan nehmen nein neu neue neuem neuen neuer neuerdings neuerlich neuerliche neuerlichem neuerlicher neuerliches neues neulich neun nicht nichts nichtsdestotrotz...
seine seinem seinen seiner seines seit seitdem seite seiten seither selbe selben selber selbst selbstredend selbstredende selbstredendem selbstredenden selbstredender selbstredendes seltsamerweise senke senken senkt senkte senkten setzen setzt setzte...
unmaßgeblichem unmaßgeblichen unmaßgeblicher unmaßgebliches unmoeglich unmoegliche unmoeglichem unmoeglichen unmoeglicher unmoegliches unmöglich unmögliche unmöglichen unmöglicher unnötig uns unsaeglich unsaegliche unsaeglichem unsaeglichen unsaeglic...
vollends vollstaendig vollstaendige vollstaendigem vollstaendigen vollstaendiger vollstaendiges vollständig vollständige vollständigem vollständigen vollständiger vollständiges vom von vor voran vorbei vorgestern vorher vorherig vorherige vorherigem ...
würde würden während währenddessen wär wäre wären x übel über überall überallhin überaus überdies überhaupt übermorgen üblicherweise übrig übrigens z.B. zahlreich zahlreichem zahlreicher zB zb. zehn zeitweise zeitweisem zeitweisen zeitweiser ziehen z...
return \%stoplist;
}
}




1;

lib/AI/MicroStructure/foo.pm  view on Meta::CPAN

=cut

__DATA__
# default
en
# names en
foo    bar   baz  foobar fubar qux  quux corge grault
garply waldo fred plugh  xyzzy thud
# names fr
toto titi tata tutu pipo
bidon test1 test2 test3
truc chose machin chouette bidule
# names nl
aap noot mies wim zus jet
teun vuur gijs lam kees bok
weide does hok duif schapen

t/t/001.t  view on Meta::CPAN

use strict;
use Test::More;


BEGIN{
use Test::More tests => 1;
use_ok('AI::MicroStructure');
};

t/t/0010.t  view on Meta::CPAN

#!/usr/bin/perl -w

use strict;
use Test::More 'no_plan';#tests =>12;
use File::Find;
use Storable qw(lock_store lock_retrieve);
use Getopt::Long;
use Digest::MD5 qw(md5_hex);
use Data::Dumper;
use Data::Printer;
use AI::MicroStructure;
use AI::MicroStructure::Object;
use AI::MicroStructure::ObjectSet;
use AI::MicroStructure::Context;

t/t/0011.t  view on Meta::CPAN

#!/usr/bin/perl -w



use strict;
use Test::More 'no_plan';#tests =>12;
use File::Find;
use Storable qw(lock_store lock_retrieve);
use Getopt::Long;
use Digest::MD5 qw(md5_hex);
use Data::Dumper;
use Data::Printer;
use AI::MicroStructure;
#use AI::MicroStructure::Object;
use AI::MicroStructure::ObjectSet;
#use AI::MicroStructure::ObjectParser;
use Env qw(PWD);


#print Dumper join "-", soundex(("rock'n'roll", 'rock and roll', 'rocknroll'));

our $meta = AI::MicroStructure->new();
our @t = $meta->structures;

my $TOP = "";

#$TOP = "/tmp/test";#$ARGV[0] unless(!@ARGV);
   $TOP = "$PWD/t/canned/docs";

#   if($TOP  eq ""){
 #   $TOP =  $meta->{state}->{path}->{"cwd/structures"} unless(!$meta->{state}->{path}->{"cwd/structures"});

  # }


#mkpath dirname($TOP),1;

t/t/0012.t  view on Meta::CPAN

use Data::Dumper;
use Test::More tests => 6;
use strict;
use AI::MicroStructure;


AI::MicroStructure->add_structure(
    ams_test_beatles => [ qw(john paul george ringo) ]
);

my $fab4 = AI::MicroStructure::ams_test_beatles->new();
my @fab = $fab4->name(1);
is( @fab, 0, "Single item" );
@fab = $fab4->name(0);
is( @fab, 0, "Four items" );

@fab = sort $fab4->name( 0 );
no warnings;
my @all = sort @cAI::MicroStructure::ams_test_beatles::List;
is_deeply( \@fab, \@all, "All items" );

# test for empty lists
AI::MicroStructure->add_structure( ams_test_null => [ ] );
my $null = AI::MicroStructure::ams_test_null->new();

my @null = $null->name;
is( @null, 0, "Single item (none)" );
@null = $null->name(  );
is( @null, 0, "Four items (none)" );

@null = sort $null->name( 0 );
no warnings;
@all = sort @AI::MicroStructure::ams_test_null::List;
is_deeply( \@null, \@all, "All items (none)" );

t/t/0013.t  view on Meta::CPAN

#!/usr/bin/perl -w



use Data::Dumper;
use strict;
use Test::More 'no_plan';#tests =>12;


use strict;

my $list = << 'EOT';
* foo
* bar
  * baz
    * A
    * B

t/t/002.t  view on Meta::CPAN

use strict;
use Test::More;
use AI::MicroStructure;

plan tests => 2;

NEW_OK: {
    my $meta = AI::MicroStructure->new('foo');
    isa_ok( $meta, 'AI::MicroStructure' );
}

NEW_UNKNOWN: {
    my $meta = eval { AI::MicroStructure->new('bam') };
    isa_ok( $meta, 'AI::MicroStructure' );
}

t/t/003.t  view on Meta::CPAN

#############################################
# Tests for Sysadm::Install/s slurp/blurt/pie
#############################################

use Test::More tests => 5;
use strict;
use warnings;

use Sysadm::Install qw(:all);

use File::Spec;
use File::Path;

my $TEST_DIR = ".";
$TEST_DIR = "t" if -d 't';

#####################################################################
# Create a temp file
#####################################################################
my $TMP_FILE = File::Spec->catfile($TEST_DIR, "test.dat");
END { unlink $TMP_FILE }

#####################################################################
# Blurt
#####################################################################
blurt("one\ntwo\nthree", $TMP_FILE);
ok(-f $TMP_FILE, "$TMP_FILE exists");

#####################################################################
# Blurt atomically

t/t/004.t  view on Meta::CPAN

#############################################
# Tests for Sysadm::Install/s plough
#############################################

use Test::More tests => 2;

use Sysadm::Install qw(:all);

use File::Spec;
use File::Path;

my $TEST_DIR = ".";
$TEST_DIR = "t" if -d 't';

#####################################################################
# Create a temp file
#####################################################################
my $TMP_FILE = File::Spec->catfile($TEST_DIR, "test.dat");
END { unlink $TMP_FILE }

#####################################################################
# Blurt
#####################################################################
blurt("one\ntwo\nthree", $TMP_FILE);
ok(-f $TMP_FILE, "$TMP_FILE exists");

#####################################################################
# Count all lines containing 'o'

t/t/005.t  view on Meta::CPAN

package AI::MicroStructure::test;
use strict;
use Test::More;
use AI::MicroStructure;

plan tests => 1;

ok(1);


__DATA__

# "alter" the shuffle method
{
    no warnings;
    my ( $i, $j ) = ( 0, 0 );
    *List::Util::shuffle = sub { sort @_ };    # item selection
    *AI::MicroStructure::any::shuffle =       # theme selection
        sub (@) { my @t = sort @_; push @t, shift @t for 1 .. $j; $j++; @t };
}

# compute the first 6 installed themes
my $meta   = AI::MicroStructure->new("any");
my @themes = ( grep { ! /^any$/ } sort $meta->structures() )[ 0 .. 5 ];

# the test list is computed now because of cache issues
my @tests
    = map { [ ( sort $meta->name( $themes[$_] => 0 ) )[ 0 .. $_ + 1 ] ] }
0..10;


for my $test (@tests) {
    my @names = microany( scalar @$test );
    is_deeply( \@names, $test,
        qq{Got "random" names from a "random" theme (@{[shift @themes]})} );
}

1;

t/t/007.t  view on Meta::CPAN

use strict;
use warnings;
use Data::Dumper;
use Storable::CouchDB;
use Test::More tests =>8;

BEGIN {


  use_ok('LWP');
  use_ok('Storable::CouchDB');
  my $s = Storable::CouchDB->new;

  ok("sprintf $s->retrieve('doc')"); #undef if not exists
  ok("sprintf $s->store('doc1' => 'data');");

t/t/008.t  view on Meta::CPAN

package AI::MicroStructure::test;
use strict;
use Test::More;
use AI::MicroStructure;

plan tests => 2;

$_ = 'canari';
my $data = AI::MicroStructure->load_data('AI::MicroStructure::test');
is( $_, 'canari', "load_data does not stomp the canari" );
is_deeply(
    $data,
    {   foo   => "bar",
        names => {
            en => "name on 3 lines",
            fr => "et en français",
        },
        long =>
            { chain => { empty => '', not => { empty => 'zlonk powie' } } },
        now => {
            test => {
                the =>
                    { slash => { too => 'zamm crr_aaack whamm clank boff' } }
            }
        },
    },
    "read DATA correctly"
);

__DATA__

t/t/008.t  view on Meta::CPAN

# names en
name
on 3
lines
# long chain empty
# long chain not empty
zlonk powie
# names fr
   et en
français
# now test/the/slash too
zamm crr_aaack whamm clank boff

t/t/009.t  view on Meta::CPAN

use Test::More;
use strict;
use AI::MicroStructure;

END {
    my %tests = (
        ':all' => [
            qw( grinder lacravate echo book jq dm stomakc maddingue
                arhuman davorg clkao dha)
        ],
        'fr' => [
            qw( grinder lacravate echo book jq dm stomakc maddingue arhuman )
        ],
        'fr/paris'         => [qw( grinder lacravate echo book )],
        'fr/lyon'          => [qw( book jq dm stomakc )],
        'fr/lyon/perrache' => [qw( book )],
        'fr/lyon/ailleurs' => [qw( jq dm stomakc )],
        'fr/marseille'     => [qw( maddingue arhuman )],
        'uk'               => [qw( davorg clkao )],
        'uk/london'        => [qw( davorg clkao )],
        'us'               => ['dha'],
        'us/new-york'      => ['dha'],
        'mars'             => [],
    );

    plan tests => ( 2 + keys %tests ) * 4 + 8;

    my @categories = AI::MicroStructure::mongers->categories();
    is_deeply(
        [ sort @categories ],
        [ grep { $_ ne ':all' } sort keys %tests ],
        "All categories (class)"
    );

    @categories = AI::MicroStructure::mongers->new()->categories();
    is_deeply(
        [ sort @categories ],
        [ grep { $_ ne ':all' } sort keys %tests ],
        "All categories (instances)"
    );

    for my $args ( [], map { [ category => $_ ] } @categories, ':all', 'zz' ) {
        my $meta = AI::MicroStructure::mongers->new(@$args);
        my $category = $args->[1] || 'fr/lyon';
        $category = 'fr/lyon'
            if $category eq 'zz';    # check fallback to default

        my ( $one, $four ) = ( 1, 4 );
        ( $one, $four ) = ( 0, 0 ) if $category eq 'mars';    # empty list
        my @mongers = $meta->name();
        is( $meta->category(), $category, "category() is $category" );
        is( @mongers, $one, "Single item ($one $category)" );
        @mongers = $meta->name(4);
        is( @mongers, $four, "Four items ($four $category)" );

        @mongers = sort $meta->name(0);
        is_deeply(
            \@mongers,
            [ sort @{ $tests{$category} } ],
            "All items ($category)"
        );
    }

    # test has_category (class)
    ok( AI::MicroStructure::mongers->has_category( 'fr' ), "class has 'fr'" );
    ok( AI::MicroStructure::mongers->has_category( 'fr/lyon' ), "class has 'fr/lyon'" );
    ok( !AI::MicroStructure::mongers->has_category( 'fr/rennes' ), "class hasn't 'fr/rennes'" );

    # test has_category (instance)
    my $meta = AI::MicroStructure::mongers->new( category => 'uk');
    ok( $meta->has_category('fr'), "instance has 'fr'" );
    ok( $meta->has_category('fr/lyon'), "instance has 'fr/lyon'" );
    ok( !$meta->has_category('fr/rennes'), "instance hasn't 'fr/rennes'" );
}

package AI::MicroStructure::mongers;
use AI::MicroStructure::MultiList;
our @ISA = ('AI::MicroStructure::MultiList');
__PACKAGE__->init();

t/t/basedep.dodo.t  view on Meta::CPAN

use strict;
use Test::More tests =>1; 


ok(1);

1;

t/t/basedep.santex.t  view on Meta::CPAN

use strict;
use Test::More tests =>1; 

ok(1);

1;

t/t/load-prerequest.t  view on Meta::CPAN

use warnings;
use Test::More tests =>2;

BEGIN {
  ok("require basedep.$_.t" ) for(qw/dodo santex/);

}


1;



( run in 0.445 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )