Net::NicoVideo::Decorator - Interface decorator pattern
package Foo::Bar; use base qw(Net::NicoVideo::Decorator); sub new { my ($class, $component, @extra_args) = @_; my $self = $class->SUPER::new($component); ... $self->initialize(@extra_args); ... ... } package main; Foo::Bar->new(Some::Class->new);
This provides common interface for the decorator pattern easily.
To install Net::NicoVideo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::NicoVideo
CPAN shell
perl -MCPAN -e shell install Net::NicoVideo
For more information on module installation, please visit the detailed CPAN module installation guide.