Created
July 22, 2012 15:46
-
-
Save xenoterracide/3160025 to your computer and use it in GitHub Desktop.
Request/Response Trace
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # impossible | |
| package Trace { | |
| use Moose::Role; | |
| has trace => ( | |
| isa => 'TraceObject', | |
| is => 'ro', | |
| ); | |
| } | |
| package Request { | |
| with 'Trace'; | |
| has '+trace' => ( | |
| is => 'rw', | |
| traits => ['SetOnce'], | |
| ); | |
| } | |
| package Response { | |
| with 'Trace'; | |
| } | |
| # Possible | |
| package Message { | |
| use Moose; | |
| has trace => ( | |
| isa => 'TraceObject', | |
| is => 'ro', | |
| ); | |
| } | |
| package Request { | |
| use Moose; | |
| extends 'Message'; | |
| has '+trace' => ( | |
| is => 'rw', | |
| traits => ['SetOnce'], | |
| ); | |
| } | |
| package Response { | |
| use Moose; | |
| extends 'Message'; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment