The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Statocles::Util - Various utility functions to reduce dependencies

VERSION

version 0.072

SYNOPSIS

    use Statocles::Util qw( dircopy );

    dircopy $source, $destination;

DESCRIPTION

This module contains some utility functions to help reduce non-core dependencies.

SUBROUTINES

dircopy

    dircopy $source, $destination;

Copy everything in $source to $destination, recursively.

run_editor

    my $was_run = run_editor( $path );

Invoke the user's text editor (from the EDITOR environment variable) to edit the given path. Returns true if an editor was invoked, false otherwise. If the editor was not able to be invoked (EDITOR was set but could not be run), an exception is thrown.

uniq_by

    my @uniq_links = uniq_by { $_->href } @links;

Filter a list into its unique items based on the result of the passed-in block. This lets us get unique links from their href attribute.

AUTHOR

Doug Bell <preaction@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 by Doug Bell.

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