Dist-Zilla-Plugin-MapMetro-MakeGraphViz

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/Plugin/MapMetro/MakeGraphViz/Map.pm  view on Meta::CPAN

    return if !defined $mapfile;

    my $graph = Map::Metro::Shim->new(filepath => $mapfile)->parse;

    my $customconnections = {};
    if($graphvizfile) {
        my $settings = $graphvizfile->slurp;
        $settings =~  s{^#.*$}{}g;
        $settings =~ s{\n}{ }g;

        for my $custom (split m/ +/ => $settings) {
            if($custom =~ m{^(\d+)-(\d+):([\d\.]+)$}) {
                my $origin_station_id = $1;
                my $destination_station_id = $2;
                my $len = $3;

                $self->set_setting(sprintf ('len-%s-%s', $origin_station_id, $destination_station_id), $len);
                $self->set_setting(sprintf ('len-%s-%s', $destination_station_id, $origin_station_id), $len);
            }
            elsif($custom =~ m{^\*(\d+):(-?[\d\.]+,-?[\d\.]+)}) {
                my $station_id = $1;



( run in 0.558 second using v1.01-cache-2.11-cpan-71847e10f99 )