App-BitBucketCli
view release on metacpan or search on metacpan
lib/App/BitBucketCli.pm view on Meta::CPAN
package App::BitBucketCli;
# Created on: 2017-04-24 08:14:30
# Create by: Ivan Wills
# $Id$
# $Revision$, $HeadURL$, $Date$
# $Revision$, $Source$, $Date$
use Moo;
use warnings;
use Carp;
use WWW::Mechanize;
use JSON::XS qw/decode_json encode_json/;
use Data::Dumper qw/Dumper/;
use English qw/ -no_match_vars /;
use App::BitBucketCli::Core;
our $VERSION = 0.009;
has core => (
is => 'ro',
handles => [qw/
opt
/],
);
around BUILDARGS => sub {
my ($orig, $class, @params) = @_;
my %param;
if ( ref $params[0] eq 'HASH' ) {
%param = %{ shift @params };
}
else {
%param = @params;
}
# only pass on defined params
for my $key (keys %param) {
delete $param{$key} if ! defined $param{$key};
}
$param{core} = App::BitBucketCli::Core->new(%param);
return $class->$orig(%param);
};
1;
__END__
=head1 NAME
App::BitBucketCli - Library for talking to BitBucket Server (or Stash)
=head1 VERSION
This documentation refers to App::BitBucketCli version 0.009
=head1 SYNOPSIS
use App::BitBucketCli;
# create a stash object
my $stash = App::BitBucketCli->new(
url => 'http://stash.example.com/',
);
# Get a list of open pull requests for a repository
my $prs = $stash->pull_requests($project, $repository);
=head1 DESCRIPTION
This module implement the sub-commands for the L<bb-cli> command line program.
( run in 2.172 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )