#!/usr/bin/perl use strict; use warnings; use lib 'lib'; use POSIX qw(tmpnam); use Test::More tests => 4; require_ok('Text::Playlist::M3U'); my $pls = new_ok('Text::Playlist::M3U' => []); my $text = <", $path; print $FH $text; close $FH; my $out = [{ attrs => {}, file => 'http://127.0.0.1:1027/udp/224.3.22.7:1234', title => 'First channel', duration => '-1', }, { attrs => { 'cn-id' => '34727751' }, file => 'http://127.0.0.1:1027/udp/224.3.23.9:1234', title => 'Second channel +8', duration => '-1', }]; is_deeply(scalar $pls->load($path), $out, "Loading test playlist"); unlink $path; is($text, $pls->dump); exit 0;