#!/usr/bin/env perl

use warnings;
use strict;
use Dist::Joseki::Find;
use Getopt::Attribute;


our $VERSION = '0.08';


our $prefix : Getopt(prefix=s);
our $suffix : Getopt(suffix=s);
our $join : Getopt(join=s);

# only print projroots, then exit -- no distfind
our $print_roots : Getopt(printroots);

# only print path to one or more given distributions
our @print_path : Getopt(printpath=s);

my $find = Dist::Joseki::Find->new;

if ($print_roots) {
    print join ' ' => $find->projroot;
    exit;
}

my @distro = $find->find_dists(\@print_path);

$join = ' ' unless defined $join;
$prefix = '' unless defined $prefix;
$suffix = '' unless defined $suffix;

print join $join => map { "$prefix$_$suffix" } @distro;


__END__

=head1 NAME

Dist::Joseki - tools for the prolific module author

=head1 SYNOPSIS

None yet (see below).

=head1 DESCRIPTION

None yet. This is an early release; fully functional, but undocumented. The
next release will have more documentation.

=cut

