Sponsored Content
Full Discussion: Don't Worry!
The Lounge What is on Your Mind? Cartoons for Geeks Don't Worry! Post 302720321 by Linux Bot on Tuesday 23rd of October 2012 06:35:01 PM
Old 10-23-2012
Don't Worry!

2012-10-24T00:26:11+02:00




Image





Tweet
Image Image Image Image
Image

Source...
 

4 More Discussions You Might Find Interesting

1. Programming

Why I don't get any output?

Hello, I am very new in writing low level programming in C. I am trying to get an output in Linux 2.6.17.6 gentoo platform, but I don't get any output. I am trying to do the following: I am trying to scan a word and print its content at the standard output by using sscanf and printf. I... (6 Replies)
Discussion started by: Sharmin
6 Replies

2. Shell Programming and Scripting

Don't Quote Me On This...

Korn Shell Scripting on Solaris 9 Hello, this is my first post, I figure I share a problem and how I fixed it as well as ask a question that I'm currently stuck on. A version of "Give a Penny" "Take a Penny" First Problem - I'm currently writing an automated version of one of the two types... (3 Replies)
Discussion started by: Janus
3 Replies

3. UNIX for Dummies Questions & Answers

I don't where to start.

I am someone who has lived on windows till I knew it inside and out but was very ignorant to other operating systems. Last week, after hearing of a much better operating system with more control and structure, I switched to Unix. I have no idea what I am doing but I am happy to learn. Could... (4 Replies)
Discussion started by: newbie sarah
4 Replies

4. Solaris

VxVM..anything to worry about in here..

DEVICE TYPE DISK GROUP STATUS c0t0d0s2 sliced rootdisk rootdg online c1t1d0s2 sliced disk01 rootdg online c2t0d0s2 sliced actsvr101 actsvr1dg online c2t2d0s2 sliced actsvr102 actsvr1dg online c2t3d0s2 ... (13 Replies)
Discussion started by: incredible
13 Replies
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)
All times are GMT -4. The time now is 07:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy