diff options
| author | franck cuny <franck@lumberjaph.net> | 2011-06-13 18:38:56 +0200 |
|---|---|---|
| committer | franck cuny <franck@lumberjaph.net> | 2011-06-13 18:38:56 +0200 |
| commit | a972089fecb01c62880c6a2a5bc5cbcb96105580 (patch) | |
| tree | 87468ea945f6e5fb457249142e1d4b5f5dc71c5a /lib/Graph/GEXF/Edge.pm | |
| parent | add flash (diff) | |
| download | stargit-a972089fecb01c62880c6a2a5bc5cbcb96105580.tar.gz | |
add Graph::GEXF while it's not on CPAN
Signed-off-by: franck cuny <franck@lumberjaph.net>
Diffstat (limited to 'lib/Graph/GEXF/Edge.pm')
| -rw-r--r-- | lib/Graph/GEXF/Edge.pm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/Graph/GEXF/Edge.pm b/lib/Graph/GEXF/Edge.pm new file mode 100644 index 0000000..a116a01 --- /dev/null +++ b/lib/Graph/GEXF/Edge.pm @@ -0,0 +1,24 @@ +package Graph::GEXF::Edge; + +use Moose; +use Data::UUID::LibUUID; + +with + 'Graph::GEXF::Role::Viz::Size' => { as => 'thickness' }, + 'Graph::GEXF::Role::Viz::Shape' => { for => 'edge' }; + +has id => ( + is => 'ro', + isa => 'Str', + required => 1, + default => sub { new_uuid_string() } +); + +has source => (is => 'ro', isa => 'Str', required => 1); +has target => (is => 'ro', isa => 'Str', required => 1); +has label => (is => 'rw', isa => 'Str'); +has weight => (is => 'rw', isa => 'Num', lazy => 1, default => 1); + +no Moose; + +1; |
