Main > Programming > Libraries >

Class::Driver 0.005

Class::Driver 0.005

Sponsored Links

Class::Driver 0.005 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.011 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 1080
Date added: 2006-11-14
Publisher: Tyler MacDonald

Class::Driver 0.005 description



EXAMPLE

# This is a really long synopsis, but hopefully it will give you an idea...

package MyPackage;

use Class::Driver;
use base q(Class::Driver);

our %drivers;

return 1;

sub new {
my($class, %args) = @_;
die "mime_type is required" unless($args{mime_type});
die "no driver to handle type $args{mime_type}"
unless($drivers{$args{mime_type}});
return $class->driver_load($drivers{$args{mime_type}}, %args);
}

sub driver_new {
my($class, %args) = @_;
return bless %args, $class;
}

sub driver_required { 1; }
sub driver_requied_here { 0; }

package MyPackage::avi;

use MyPackage;
use base q(MyPackage);
use Video::Info;

$MyPackage::drivers{video/x-msvideo} = avi;

return 1;

sub driver { "avi"; }

sub driver_new {
my($class, %args) = @_;
die "file is a required parameter for $args{mime_type} files"
unless($args{file});
$args{info} = Video::Info->new(-file => $args{file})
or die "Failed to create a Video::Info object for $args{file}";
return $class->SUPER::driver_new(%args);
}

sub duration {
my $self = shift;
return $args{info}->duration;
}

package MyPackage::mp3;
use base q(MyPackage);
use MP3::Info;

$MyPackage::drivers{audio/mpeg} = mp3;

## (etc...)

package main;

my $foo = MyPackage->new(file => foobar.mp3, mime_type => audio/mpeg);
print "foobar.mp3 is ", $foo->duration, " seconds long.n";

Class::Driver 0.005 Screenshot

Advertisements

Class::Driver 0.005 Keywords

Bookmark Class::Driver 0.005

Hyperlink code:
Link for forum:

Class::Driver 0.005 Copyright

WareSeeker periodically updates pricing and software information of Class::Driver 0.005 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Class::Driver 0.005 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Class::Inner is a perlish implementation of Java like inner classes. Free Download
Class::DBI::Query is a Perl module with deprecated SQL manager for Class::DBI. Free Download
Class::Meta is a Perl class automation, introspection, and data validation. Free Download
Class::Std is a Perl module to support for creating standard "inside-out" classes. Free Download
Class::Accessor::Named is a great way to automate the tedious task of generating accessors and mutators. Free Download
Class::Agreement is a Perl module that add contracts to your Perl classes easily. Free Download
Class::Std::Utils is a Perl module for utility subroutines for building "inside-out" objects. Free Download
Class::Declare::Attributes is a Perl module with Class::Declare method types using Perl attributes. Free Download