#!/usr/bin/env perl =pod =head1 NAME pieces - link two things together =head1 SYNOPSIS pieces-link links two things together USAGE: pieces link "thing1" "thing2" EXAMPLE: pieces link "file:///home/brennen/p1k3" "urn:vimwiki:p1k3" =head1 AUTHOR Brennen Bearnes =cut use warnings; use strict; use 5.10.0; use App::Pieces; use Cwd qw(cwd abs_path); use Getopt::Long; use Pod::Usage; GetOptions( # 'config=s' => \$config_file, help => sub { pod2usage(0) }, ) or pod2usage(2); my $p = App::Pieces->new(); $p->add_link($ARGV[0], $ARGV[1]); $p->foreach_row( 'SELECT * FROM links', sub { my ($data) = @_; say $data->{from_piece} . " " . $data->{to_piece}; } );