Test::File::ShareDir::Utils(3) User Contributed Perl Documentation Test::File::ShareDir::Utils(3)

# [NAME](#NAME)

Test::File::ShareDir::Utils - Simple utilities for File::ShareDir testing

# [VERSION](#VERSION)

version 1.001002

# [SYNOPSIS](#SYNOPSIS)

```
  use Test::File::ShareDir::Utils qw( extract_dashes );
  my $hash = extract_dashes('dists', $oldhash );
```

# [EXPORTABLE FUNCTIONS](#EXPORTABLE_FUNCTIONS)

## [extract\_dashes](#extract_dashes)

A utility that helps transform:

```
  -opt_a => bar
  -opt_b => baz
  NameA  => NameAValue
  NameB  => NameBValue
```

Into

```
  opt_a => bar
  opt_b => baz
  modules => {
    NameA => NameAValue
    NameB => NameBValue
  }
```

This is a useful approach used all over import and functional style interfaces due to explicit configuration being needed only on rare occasions.

# [AUTHOR](#AUTHOR)

Kent Fredric &lt;kentnl@cpan.org&gt;

# [COPYRIGHT AND LICENSE](#COPYRIGHT_AND_LICENSE)

This software is copyright (c) 2017 by Kent Fredric &lt;kentnl@cpan.org&gt;.

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

2026-04-22 perl v5.42.2

---

Document: Test::File::ShareDir::Utils(3pm) from perl-test-file-sharedir 1.001002-r1 (Chainguard OS)
Source: https://github.com/kentnl/Test-File-ShareDir
