use v5.12; use warnings; use Mojo::DOM; my $data = join "", ; my $dom = Mojo::DOM->new($data); say &t::page( TITLE => $dom->at('title'), NAME => $dom->at('name'), ENTRIES => \&entries, ); sub entries { map { t::entry ( TITLE => $_->at("title"), HREF => $_->at("link")->{href}, DESC => $_->at('media\:group > media\:description') ); } $dom->find('entry')->each ; } package t; # poor man's templates sub page { my %p = @_; << "____" }

$p{ TITLE }

$p{ NAME } ____ sub entry { my %p = @_; << "____" }
  • [$p{ HREF }|$p{ TITLE }]

    $p{ DESC }

  • ____ package main; #### __DATA__ yt:playlist:PLA9_Hq3zhoFyOpb-U3DMU7OT93dPUdtpE PLA9_Hq3zhoFyOpb-U3DMU7OT93dPUdtpE UC7y4qaRSb5w2O8cCHOsKZDw TPC 2022 in Houston Conference in the Cloud! A Perl and Raku Conf https://www.youtube.com/channel/UC7y4qaRSb5w2O8cCHOsKZDw 2022-06-22T19:04:37+00:00 yt:video:waHAGThlRH8 waHAGThlRH8 UC7y4qaRSb5w2O8cCHOsKZDw Raku -Ofun for Everyone - Daniel Sockwell Conference in the Cloud! A Perl and Raku Conf https://www.youtube.com/channel/UC7y4qaRSb5w2O8cCHOsKZDw 2022-06-24T15:57:38+00:00 2022-06-25T03:36:26+00:00 Raku -Ofun for Everyone - Daniel Sockwell Rakoons like to say that Raku is -Ofun (optimized for fun). This talk ... YADDA YADDA ... yt:video:3BYlObnzuKQ 3BYlObnzuKQ UC7y4qaRSb5w2O8cCHOsKZDw Introducing Perl Data Types - Will Braswell Conference in the Cloud! A Perl and Raku Conf https://www.youtube.com/channel/UC7y4qaRSb5w2O8cCHOsKZDw 2022-06-24T16:00:10+00:00 2022-06-24T16:00:10+00:00 Introducing Perl Data Types - Will Braswell Data types are hints to a computer language, telling the language’s ... YADDA YADDA ...