Re: Can someone explain this to me?

From: A. Sinan Unur (asu1_at_c-o-r-n-e-l-l.edu)
Date: 10/31/03


Date: 31 Oct 2003 16:32:57 GMT

Stan Brown <stanb@panix.com> wrote in
news:bnu1ce$gf4$1@reader2.panix.com:

> I'm trying to use the Video::Capture module (which has no docs) to
> capture images from multple cards. I've finally found the following
> snippet of code in the perl module itself:
>
> sub new(;$) {
> my $class = shift;
> my $device = shift || "/dev/video0";
> my $self = bless { device => $device }, $class;
>
>
> It looks like the devie needs to be passed as the 2nd argument to the
> new call., and if a 2nd arg is not received it defaults to the first
> card.
>
> So far so good. Probel is the example cdoe I have passes _NO_
> arguments to the new call. Any idea what the first one should be?

when you say

my $video = Video::Capture->new();

the new method is passed Video::Capture as the first argument.

Sinan.