Navigation Menu

Skip to content

Commit

Permalink
make API more like union (if you go through the trouble to create an …
Browse files Browse the repository at this point in the history
…object, might as well use it)
  • Loading branch information
Chris Fields committed Feb 20, 2012
1 parent b1ba37b commit 4b8159d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions lib/Biome/Role/Location/Locatable.pm
Expand Up @@ -113,16 +113,14 @@ sub intersection {
if ($start > $end) {
return;
} else {
# TODO: does this need a separate _build_intersection method like
# union?
$intersect = (blessed $self)->new(-start => $start,
-end => $end,
-strand => $intersect_strand);
}
}
if (wantarray()) {
return ($intersect->start, $intersect->end, $intersect->strand);
} else {
return $intersect;
}
return $intersect;
}

sub union {
Expand Down

0 comments on commit 4b8159d

Please sign in to comment.