| 1 | package Video::Info::FOO; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | our $VERSION = '0.00'; | |||||||||
| 5 | |||||||||||
| 6 | 1 | ▶ | use base qw(Video::Info); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | ####################################### | ||||||||||
| 9 | # use this to define your custom | ||||||||||
| 10 | # get/set methods. if they really | ||||||||||
| 11 | # belong in Video::Info, let me know | ||||||||||
| 12 | ####################################### | ||||||||||
| 13 | use Class::MakeMethods::Emulator::MethodMaker | ||||||||||
| 14 | 1 | ▶ | get_set => [qw( )], | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | 1 | ; | |||||||||
| 16 | |||||||||||
| 17 | ####################################### | ||||||||||
| 18 | # leave this intact, add any extra | ||||||||||
| 19 | # init stuff you need (maybe a get/set | ||||||||||
| 20 | # method?). feel free to override | ||||||||||
| 21 | # init_attributes() | ||||||||||
| 22 | ####################################### | ||||||||||
| 23 | 1 | ▶ | sub init { | ||||||||
|
Subroutine
init: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 24 | 1 | my $self = shift; | |||||||||
| 25 | 1 | my %param = @_; | |||||||||
| 26 | 1 | $self->init_attributes(@_); | |||||||||
| 27 | 1 | return $self; | |||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | ####################################### | ||||||||||
| 31 | # Obtain the filehandle and extract the | ||||||||||
| 32 | # properties from the file. this is | ||||||||||
| 33 | # the core function of the module | ||||||||||
| 34 | ####################################### | ||||||||||
| 35 | 1 | ▶ | sub probe { | ||||||||
|
Subroutine
probe: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 36 | 1 | my $self = shift; | |||||||||
| 37 | |||||||||||
| 38 | 1 | my $fh = $self->handle; ## inherited from Video::Info | |||||||||
| 39 | |||||||||||
| 40 | 1 | ▶ | while(<$fh>){ | ||||||||
|
Branch: 1 branch
| |||||||||||
| 41 | #parse it! | ||||||||||
| 42 | } | ||||||||||
| 43 | |||||||||||
| 44 | ##################################### | ||||||||||
| 45 | #return 1 for a successful parse | ||||||||||
| 46 | ##################################### | ||||||||||
| 47 | 1 | return 1; | |||||||||
| 48 | } | ||||||||||
| 49 | |||||||||||
| 50 | 1 | 1; | |||||||||
| 51 | |||||||||||
| 52 | __END__ | ||||||||||