#!/usr/bin/perl

use 5.010;
use strict;
use warnings;

use Perinci::CmdLine;

our $VERSION = '0.54'; # VERSION

Perinci::CmdLine->new(url=>'/Setup/File/Symlink/setup_symlink', undo=>1)->run;

1;
# ABSTRACT: Create symlink, with undo/redo capability
# PODNAME: u-symlink


__END__
=pod

=head1 NAME

u-symlink - Create symlink, with undo/redo capability

=head1 VERSION

version 0.54

=head1 SYNOPSIS

 # create a symlink
 $ u-symlink --symlink /tmp/l1 --target target1

 # this will replace symlink's target
 $ u-symlink --symlink /tmp/l1 --target target2

 # list history
 $ u-symlink --history

 # undo last action, now symlink points back to 'target1'
 $ u-symlink --undo

 # undo again, now symlink '/tmp/l1' is removed
 $ u-symlink --undo

 # redo, now symlink '/tmp/l1' is recreated and points to 'target1'
 $ u-symlink --redo

 # redo, now symlink '/tmp/l1' points to 'target2'
 $ u-symlink --redo

 # forget history
 $ u-symlink --clear-history

 # display help for more options
 $ u-symlink --help

=head1 DESCRIPTION

This script is just a command-line interface to L<Setup::File::Symlink> to
demonstrate undo capability via command-line.

=head1 SEE ALSO

L<Perinci::CmdLine>

L<Setup::File::Symlink>

=head1 AUTHOR

Steven Haryanto <stevenharyanto@gmail.com>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Steven Haryanto.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut

