Acme-KnowledgeWisdom

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

        use Test::Exception;
    
        my $kw_questions = Acme::KnowledgeWisdom->new();
        dies_ok { $kw_questions->get };

DESCRIPTION
    What if the knowledge is not in answers, but in questions?

ACCESSORS
  in_questions
    Boolean, default value is true.

  has_already
    Boolean, default value is false.

METHODS
  get
    Get the knowledge and wisdom.

  ask
    Ask a question.

AUTHOR
    Jozef

lib/Acme/KnowledgeWisdom.pm  view on Meta::CPAN

package Acme::KnowledgeWisdom;

our $VERSION = '0.01';

use Moose;
use warnings FATAL => 'all';

has 'in_questions' => ( isa => 'Bool', is => 'ro', default => 1);
has 'has_already'  => ( isa => 'Bool', is => 'ro', default => 0);

sub get {
    my $kw = shift;
    
    return $kw->ask
        if $kw->in_questions;

    return 42;
}

lib/Acme/KnowledgeWisdom.pm  view on Meta::CPAN

    dies_ok { $kw_questions->get };

=head1 DESCRIPTION

What if the knowledge is not in answers, but in questions?

=head1 ACCESSORS

=head2 in_questions

Boolean, default value is true.

=head2 has_already

Boolean, default value is false.

=head1 METHODS

=head2 get

Get the knowledge and wisdom.

=head2 ask

Ask a question.



( run in 0.500 second using v1.01-cache-2.11-cpan-0a6323c29d9 )