The Publisher using ZMQx::Class
file: bin/zmqx_publisher.pl @c3e99e4d 18: sub get_mp3_data { 19: use Path::Iterator::Rule; 20: my $rule = Path::Iterator::Rule->new->file->name('*.mp3'); 21: my @all; 22: my $next = $rule->iter( '/home/domm/media/mp3', {relative=>1}); 23: while ( my $file = $next->() ) { 24: my ($artist, $record, $track)=split(/\//,$file,3); 25: next unless $track && $track =~ /\.mp3$/; 26: push(@all,[ 27: $file, 28: $artist || 'unknown artist', 29: $record || 'unknown record', 30: $track 31: ]); 32: } 33: return \@all; 34: }
boring