[Bps-public-commit] r16447 - in Prophet/branches/class-dispatch: .

sartak at bestpractical.com sartak at bestpractical.com
Tue Oct 21 14:32:24 EDT 2008


Author: sartak
Date: Tue Oct 21 14:32:24 2008
New Revision: 16447

Added:
   Prophet/branches/class-dispatch/lib/Prophet/CLI/Parameters.pm
Modified:
   Prophet/branches/class-dispatch/   (props changed)

Log:
 r74309 at onn:  sartak | 2008-10-21 14:32:16 -0400
 Add the CLI::Parameters role for cli and context attrs


Added: Prophet/branches/class-dispatch/lib/Prophet/CLI/Parameters.pm
==============================================================================
--- (empty file)
+++ Prophet/branches/class-dispatch/lib/Prophet/CLI/Parameters.pm	Tue Oct 21 14:32:24 2008
@@ -0,0 +1,24 @@
+#!/usr/bin/env perl
+package Prophet::CLI::Parameters;
+use Moose::Role;
+
+has cli => (
+    is       => 'rw',
+    isa      => 'Prophet::CLI',
+    required => 1,
+);
+
+has context => (
+    is       => 'rw',
+    isa      => 'Prophet::CLIContext',
+    lazy     => 1,
+    default  => sub {
+        my $self = shift;
+        $self->cli->context;
+    },
+);
+
+no Moose::Role;
+
+1;
+



More information about the Bps-public-commit mailing list