6 More Discussions You Might Find Interesting
1. What is on Your Mind?
Wish you many many happy returns of the day, stay blessed. (1 Reply)
Discussion started by: Akshay Hegde
1 Replies
2. Linux
The Linux kernel was originally created by Linus Torvalds, a Finnish computer science student, and first announced to the world on August 25, 1991-exactly 20 years ago today. At the time, Torvalds described his work as a "hobby" and contended that it would not be "big and professional" like the GNU... (2 Replies)
Discussion started by: itkamaraj
2 Replies
3. SCO
Can anybody help me out to mount USB flash /floppy drive in sco openserver 6.0 . (5 Replies)
Discussion started by: sureshdrajan
5 Replies
4. News, Links, Events and Announcements
Linux has turned 10 . Happy birthday and congrats to the hackers whose labor pains keep giving us new tarballs. (From /. ) (1 Reply)
Discussion started by: mib
1 Replies
5. HP-UX
Does anyone know of a site that documents the various addressing schemes used with SCSI floppy disk drives? (5 Replies)
Discussion started by: Drew_Harrison
5 Replies
6. BSD
My FreeBSD install at ad0s1, and Windows 2000 at ad2s1.
Everytime I start my FreeBSD, it shows me this message:
fdc0: cmd 3 failed at out byte 1 of 3
pmtimer 0 on isa0
fdc0: cannot reserve I/O port range (6 ports)
My Floppy drive info:
0x03F2 - 0x03F3
0x03F4 - 0x03F5
0x03F7 - 0x03F7... (6 Replies)
Discussion started by: _cs
6 Replies
LEARN ABOUT OSX
tap::parser::source::perl
TAP::Parser::Source::Perl(3pm) Perl Programmers Reference Guide TAP::Parser::Source::Perl(3pm)
NAME
TAP::Parser::Source::Perl - Stream Perl output
VERSION
Version 3.17
SYNOPSIS
use TAP::Parser::Source::Perl;
my $perl = TAP::Parser::Source::Perl->new;
my $stream = $perl->source( [ $filename, @args ] )->get_stream;
DESCRIPTION
Takes a filename and hopefully returns a stream from it. The filename should be the name of a Perl program.
Note that this is a subclass of TAP::Parser::Source. See that module for more methods.
METHODS
Class Methods
"new"
my $perl = TAP::Parser::Source::Perl->new;
Returns a new "TAP::Parser::Source::Perl" object.
Instance Methods
"source"
Getter/setter the name of the test program and any arguments it requires.
my ($filename, @args) = @{ $perl->source };
$perl->source( [ $filename, @args ] );
"croak"s if $filename could not be found.
"switches"
my $switches = $perl->switches;
my @switches = $perl->switches;
$perl->switches( @switches );
Getter/setter for the additional switches to pass to the perl executable. One common switch would be to set an include directory:
$perl->switches( ['-Ilib'] );
"get_stream"
my $stream = $source->get_stream($parser);
Returns a stream of the output generated by executing "source". Must be passed an object that implements a "make_iterator" method.
Typically this is a TAP::Parser instance.
"shebang"
Get the shebang line for a script file.
my $shebang = TAP::Parser::Source::Perl->shebang( $some_script );
May be called as a class method
"get_taint"
Decode any taint switches from a Perl shebang line.
# $taint will be 't'
my $taint = TAP::Parser::Source::Perl->get_taint( '#!/usr/bin/perl -t' );
# $untaint will be undefined
my $untaint = TAP::Parser::Source::Perl->get_taint( '#!/usr/bin/perl' );
SUBCLASSING
Please see "SUBCLASSING" in TAP::Parser for a subclassing overview.
Example
package MyPerlSource;
use strict;
use vars '@ISA';
use Carp qw( croak );
use TAP::Parser::Source::Perl;
@ISA = qw( TAP::Parser::Source::Perl );
sub source {
my ($self, $args) = @_;
if ($args) {
$self->{file} = $args->[0];
return $self->SUPER::source($args);
}
return $self->SUPER::source;
}
# use the version of perl from the shebang line in the test file
sub _get_perl {
my $self = shift;
if (my $shebang = $self->shebang( $self->{file} )) {
$shebang =~ /^#!(.*perl.*?)(?:(?:s)|(?:$))/;
return $1 if $1;
}
return $self->SUPER::_get_perl(@_);
}
SEE ALSO
TAP::Object, TAP::Parser, TAP::Parser::Source,
perl v5.12.5 2012-11-03 TAP::Parser::Source::Perl(3pm)