olof / Text-FileTree

Perl module for converting a list of files with full paths to a tree
1 stars 2 forks source link

Allow for arrayref to be passed to ->parse #4

Open trapd00r opened 2 years ago

trapd00r commented 2 years ago

Allow for arguments to ->parse to be passed as not just a flat list, but also as an arrayref:

my $refeliref = ['foo/bar/baz.mp3', 'foo/bar/laleh.flac'];
p $tree->parse($refeliref);
{
    foo   {
        bar   {
            baz.mp3      {},
            laleh.flac   {}
        }
    }
}
olof commented 2 years ago

Thanks! I don't see a reason why not; Is there a specific reason why?