Business-Mondo

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

      "runtime" : {
         "requires" : {
            "Carp" : "0",
            "Data::Currency" : "0.06",
            "DateTime" : "1.26",
            "DateTime::Format::DateParse" : "0.05",
            "Locale::Currency::Format" : "1.35",
            "Mojolicious" : "6.62",
            "Moo" : "2.001001",
            "Throwable" : "0.200011",
            "Try::Tiny" : "0.22",
            "Types::Standard" : "1.000005",
            "perl" : "5.010001"
         }
      }
   },
   "release_status" : "stable",
   "resources" : {
      "bugtracker" : {
         "web" : "https://github.com/leejo/business-mondo/issues"
      },

META.yml  view on Meta::CPAN

    - inc
requires:
  Carp: '0'
  Data::Currency: '0.06'
  DateTime: '1.26'
  DateTime::Format::DateParse: '0.05'
  Locale::Currency::Format: '1.35'
  Mojolicious: '6.62'
  Moo: '2.001001'
  Throwable: '0.200011'
  Try::Tiny: '0.22'
  Types::Standard: '1.000005'
  perl: '5.010001'
resources:
  bugtracker: https://github.com/leejo/business-mondo/issues
  homepage: https://metacpan.org/module/Business::Mondo
  license: http://dev.perl.org/licenses/
  repository: https://github.com/leejo/business-mondo
version: '9999.99'
x_repository:
  type: git

Makefile.PL  view on Meta::CPAN

    NAME             => 'Business::Mondo',
    VERSION_FROM     => 'lib/Business/Mondo/Version.pm',
    AUTHOR           => 'Lee Johnson <leejo@cpan.org>',
    LICENSE          => 'perl',
    MIN_PERL_VERSION => '5.10.1',
    PREREQ_PM => {
        'Moo'                  => 2.001001,
        'Carp'                 => 0, # Carp was first released with perl 5
        'Throwable'            => 0.200011,
        'Mojolicious'          => 6.62,
        'Try::Tiny'            => 0.22,
        'Types::Standard'      => 1.000005,
        'Data::Currency'       => 0.06000,
        'DateTime'             => 1.26,
        'DateTime::Format::DateParse' => 0.05,
        'Locale::Currency::Format' => 1.35,
    },
    TEST_REQUIRES => {
        'Test::Most'       => 0.31,
        'Test::Deep'       => 0.112,
        'Test::Exception'  => 0.32,

lib/Business/Mondo/Resource.pm  view on Meta::CPAN


=cut

use strict;
use warnings;

use Moo;
use Carp qw/ confess carp /;
use Mojo::JSON qw/ encode_json /;
use Scalar::Util qw/ blessed /;
use Try::Tiny;

=head1 ATTRIBUTES

The Resource class has the following attributes (with their type).

    client (Business::Mondo::Client) - REQUIRED
    url (Str)
    url_no_id (Str)

=cut

t/business/mondo/exception.t  view on Meta::CPAN

#!perl

use strict;
use warnings;

use Test::Most;
use Test::Exception;
use Try::Tiny;

use_ok( 'Business::Mondo::Exception' );

throws_ok(
    sub { Business::Mondo::Exception->throw },
    qr/Missing required arguments: message/,
    '->throw requires a message',
);

throws_ok(

t/business/mondo/exception.t  view on Meta::CPAN

is( $@->code,'400',' ... code available' );
is( $@->response,'400 Bad Request',' ... response available' );

try {
    Business::Mondo::Exception->throw(
        message => 'Boo!'
    );
}
catch {
    isa_ok( $_,'Business::Mondo::Exception' );
    is( $_->message,'Boo!','Try::Tiny catches exceptions' );
};

done_testing();

# vim: ts=4:sw=4:et



( run in 0.660 second using v1.01-cache-2.11-cpan-05444aca049 )