« blib/lib/XML/NewsML_G2/Role/Writer/News_Item_Video.pm
↑ Summary
blib/lib/XML/NewsML_G2/Writer/Package_Item.pm »
| 1 | package XML::NewsML_G2::Role::Writer::News_Item_Audio; | ||||||||||
| 2 | |||||||||||
| 3 | 2 | ▶ | use Moose::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use namespace::autoclean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 2 | with 'XML::NewsML_G2::Role::Writer'; | |||||||||
| 7 | |||||||||||
| 8 | around '_build_g2_catalog_schemes' => sub { | ||||||||||
| 9 | 1 | ▶ | my ( $orig, $self, @args ) = @_; | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | my $result = $self->$orig(@args); | |||||||||
| 11 | 1 | $result->{rnd} = undef; | |||||||||
| 12 | 1 | return $result; | |||||||||
| 13 | 2 | }; | |||||||||
| 14 | |||||||||||
| 15 | after '_create_remote_content' => sub { | ||||||||||
| 16 | 0 | ▶ | my ( $self, $root, $audio ) = @_; | ||||||||
|
Subroutine
__ANON__: not called CC=4 SCAR=30.0
| |||||||||||
| 17 | |||||||||||
| 18 | 0 | for (qw/size duration audiosamplerate/) { | |||||||||
| 19 | 0 | ▶ | $root->setAttribute( $_, $audio->$_ ) if defined $audio->$_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 0 | my $audiochannels = | |||||||||
| 23 | $self->scheme_manager->build_qcode( 'adc', $audio->audiochannels ); | ||||||||||
| 24 | 0 | ▶ | $root->setAttribute( 'audiochannels', $audiochannels ) if $audiochannels; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | 0 | return; | |||||||||
| 26 | 2 | }; | |||||||||
| 27 | |||||||||||
| 28 | 2 | 1; | |||||||||
| 29 | __END__ | ||||||||||
| 30 | |||||||||||
| 31 | =head1 NAME | ||||||||||
| 32 | |||||||||||
| 33 | XML::NewsML_G2::Role::Writer::News_Item_Audio - Role for writing news items of type 'audio' | ||||||||||
| 34 | |||||||||||
| 35 | =head1 DESCRIPTION | ||||||||||
| 36 | |||||||||||
| 37 | This module serves as a role for all NewsML-G2 writer classes and get automatically applied when the according news item type is written | ||||||||||
| 38 | |||||||||||
| 39 | =head1 AUTHOR | ||||||||||
| 40 | |||||||||||
| 41 | Mario Paumann C<< <mario.paumann@apa.at> >> | ||||||||||
| 42 | |||||||||||
| 43 | =head1 LICENCE AND COPYRIGHT | ||||||||||
| 44 | |||||||||||
| 45 | Copyright (c) 2014, APA-IT. All rights reserved. | ||||||||||
| 46 | |||||||||||
| 47 | See L<XML::NewsML_G2> for the license. | ||||||||||