The shortest_path method is not designed for solving the travelling salesman problem. It just finds the shortest way to get from A to D following the edges you've defined. A-B-D (weight 700) is shorter than A-C-D (1300), A-B-C-D (1300), or A-C-B-D (1700). The direct route A-D (weight 700) has an equal to A-B-D; in the case of multiple routes with equal weight, I don't know whether which one is returned is random or deterministic.
Graph may have what you need.
use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name