App-BambooCli

 view release on metacpan or  search on metacpan

lib/App/BambooCli/Config.pm  view on Meta::CPAN

    is      => 'rw',
    default => sub {
        return -f '.bamboo' ? '.bamboo' : "$ENV{HOME}/.bamboo";
    },
);
has bamboo => (
    is      => 'rw',
    lazy    => 1,
    builder => '_bamboo',
);
has [qw/ hostname username password debug /] => (
    is      => 'rw',
);

sub _bamboo {
    my ($self) = @_;
    my $bamboo = new Net::Bamboo;

    $bamboo->hostname($self->hostname);
    $bamboo->debug($self->debug);

    if ($self->username && $self->password) {
        $bamboo->username($self->username);
        $bamboo->password($self->password);
    }

    return $bamboo;
}

1;

__END__

=head1 NAME

lib/App/BambooCli/Config.pm  view on Meta::CPAN

=head1 SUBROUTINES/METHODS

=head2 C<name>

=head2 C<bamboo>

=head2 C<hostname>

=head2 C<username>

=head2 C<password>

=head2 C<debug>

=head2 C<_bamboo>

=head1 DIAGNOSTICS

=head1 CONFIGURATION AND ENVIRONMENT

=head1 DEPENDENCIES



( run in 0.971 second using v1.01-cache-2.11-cpan-49f99fa48dc )