summaryrefslogtreecommitdiff
path: root/BatchPayment/Debug.pm
diff options
context:
space:
mode:
Diffstat (limited to 'BatchPayment/Debug.pm')
-rw-r--r--BatchPayment/Debug.pm20
1 files changed, 20 insertions, 0 deletions
diff --git a/BatchPayment/Debug.pm b/BatchPayment/Debug.pm
new file mode 100644
index 0000000..71a9e6d
--- /dev/null
+++ b/BatchPayment/Debug.pm
@@ -0,0 +1,20 @@
+package Business::BatchPayment::Debug;
+
+=head1 DESCRIPTION
+
+The 'debug' attribute. All Business::BatchPayment classes should support
+this. $Business::BatchPayment::DEBUG can be set to turn on debugging
+globally.
+
+=cut
+
+use Moose::Role;
+
+has 'debug' => (
+ is => 'rw',
+ isa => 'Int',
+ default => sub { $Business::BatchPayment::DEBUG || 0 },
+ lazy => 1,
+);
+
+1;