Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

padre::task::eval(3pm) [debian man page]

Padre::Task::Eval(3pm)					User Contributed Perl Documentation				    Padre::Task::Eval(3pm)

NAME
Padre::Task::Eval - Task for executing arbitrary code via a string eval SYNOPSIS
my $task = Padre::Task::Eval->new( prepare => '1 + 1', run => 'my $foo = sub { 2 + 3 }; $foo->();', finish => '$_[0]->{prepare}', ); $task->prepare; $task->run; $task->finish; DESCRIPTION
Padre::Task::Eval is a stub class used to implement testing and other miscellaneous functionality. It takes three named string parameters matching each of the three execution phases. When each phase of the task is run, the string will be eval'ed and the result will be stored in the same has key as the source string. If the key does not exist at all, nothing will be executed for that phase. Regardless of the execution result (or the non-execution of the phase) each phase will always return true. However, if the string eval throws an exception it will escape the task object (although when run properly inside of a task handle it should be caught by the handle). METHODS
This class contains now additional methods beyond the defaults provided by the Padre::Task API. COPYRIGHT &; LICENSE Copyright 2008-2012 The Padre development team as listed in Padre.pm. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.14.2 2012-06-27 Padre::Task::Eval(3pm)

Check Out this Related Man Page

Padre::Task::PPI(3pm)					User Contributed Perl Documentation				     Padre::Task::PPI(3pm)

NAME
Padre::Task::PPI - Generic PPI background processing task SYNOPSIS
package Padre::Task::MyFancyTest; use strict; use base 'Padre::Task::PPI'; # Will be called after ppi-parsing: sub process { my $self = shift; my $ppi = shift or return; my $result = ...expensive_calculation_using_ppi... $self->{result} = $result; return; } 1; # elsewhere: Padre::Task::MyFancyTest->new( text => 'parse-this!', )->schedule; DESCRIPTION
This is a base class for all tasks that need to do expensive calculations using PPI. The class will setup a PPI::Document object from a given piece of code and then call the "process_ppi" method on the task object and pass the PPI::Document as first argument. You can either let "Padre::Task::PPI" fetch the Perl code for parsing from the current document or specify it as the ""text"" parameter to the constructor. Note: If you don't supply the document text and there is no currently open document to fetch it from, "new()" will simply return the empty list instead of a "Padre::Task::PPI" object. SEE ALSO
This class inherits from "Padre::Task" and its instances can be scheduled using "Padre::TaskManager". The transfer of the objects to and from the worker threads is implemented with Storable. AUTHOR
Steffen Mueller "smueller@cpan.org" COPYRIGHT AND LICENSE
Copyright 2008-2012 The Padre development team as listed in Padre.pm. This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5 itself. perl v5.14.2 2012-06-27 Padre::Task::PPI(3pm)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How does the Kernal schedules Tasks?

hello all, as we know that the kernal Schedules tasks with some time slice given to each. how does the Kernal know that the time of a Task has been elapsed? does it follow the syatem Clock?or how? thanks for your time (4 Replies)
Discussion started by: compbug
4 Replies

2. Shell Programming and Scripting

redefine warning(Eval) in perl

Here is my perl Program: #!/usr/bin/perl -w my $a="sam"; my $b="ste"; my $c="abcdef"; my $d=931; $str=" @<<<<< @>>>>>>>>>> @|||||||||||||||||||| @######### \$a,\$b,\$c,\$d ."; open(FILE,">abc.txt"); $temp="format FILE = $str"; eval $temp; write FILE; print FILE "\n\n"; (3 Replies)
Discussion started by: sameerstephen
3 Replies

3. Shell Programming and Scripting

Help with reading file with values and updating another file

Hi I need some help with a task, i am an absolute newbie to any form of shell scripting and request guidance. Task: 1. Read a config file in form of name value pair ex host=www.test.com port=8080 binding="dynamic" or "other" or "something else" key1=value1 key2=value2 key3=value4... (4 Replies)
Discussion started by: mk7074
4 Replies

4. Shell Programming and Scripting

Eval command help

I have file called myfile which has the text "myserver" in it. I need to have a command to ping "myserver". How would I do that? I tried when I type at the terminal I get the output as . How do I do something like a ? thanks, Nick (5 Replies)
Discussion started by: nikhilfake
5 Replies

5. UNIX for Dummies Questions & Answers

Deleting the first line of .gz file

Hi All, I have too many .gz files (test.gz). Task is to remove first line of each file. Can I do it without unzipping the files? Your help is appreciated. (4 Replies)
Discussion started by: Chulamakuri
4 Replies

6. Shell Programming and Scripting

wildcard in sed substitution

I have a number of strings that I want to remove: <b>Task: 100</b> <b>Task: 1100 </b> <b>Task: 2200 </b> But the numbers in them can vary from 4, 5 8, digits in length. But, no alpha chars. I tried this: sed '/Task:/,//d' $file > tmpfile ; mv tmpfile $file But it removed additional text on... (5 Replies)
Discussion started by: dba_frog
5 Replies

7. Shell Programming and Scripting

Task

Hi experts, I have a problem with the below shell task: I need to modify the file creatin a paired row , per each row which matches filter (e.g. number of nonempty columns = 5) Output should look like this: second row is original one from the input, first row(red) is pairing row, it's... (29 Replies)
Discussion started by: hernand
29 Replies

8. Shell Programming and Scripting

AWK Command

I have a file seperated by pipe(|) operator I want to fetch lines from the file having the word "Task started" in 7th column awk -F"" '{if($7 == "Task started") print $0}' file.txt But this code is not giving any output. Please kindly point out where I went wrong (43 Replies)
Discussion started by: Prachi Gupta
43 Replies

9. Shell Programming and Scripting

Eval

thank you (35 Replies)
Discussion started by: ratnalein88
35 Replies

10. Shell Programming and Scripting

ISSUE in handling multiple same name files :-(

Dear all, My work is completely stuck cos of the following issue. Please find it here and kindly help me. Task is following: I have set of files with such pattern 1t-rw-rw-r-- 1 emily emily 119 Jun 11 10:45 vgtree_5_1_pfs.root 3t-rw-rw-r-- 1 emily emily 145 Jun 11 10:46 vgtree_5_3_pfs.root... (4 Replies)
Discussion started by: emily
4 Replies

11. Solaris

Running a script in a sub dir with space in it

Hi I am trying to run a script in a sub-directory, that has one space on it: such as: /internaldisk1/Task Logs1, but my entry in cron is not working: 0,5,10,15,20,25,30,35,40,45,50,55 * * * * /internaldisk1/Task\ logs1/./remov_reject.sh > /var/tmp/interd_`date '+%Y%M%d'`.log 2>&1 Please can... (4 Replies)
Discussion started by: fretagi
4 Replies

12. Shell Programming and Scripting

How to avoid running duplicated task?

Hi Gurus, I have requirement to run different task based on input value. the sample file as below: file1 (contains code need to be run) code aaa1 aaa2 bbb ccc ddd file2 (contains all codes and job name) code job1 job2 aaa1, job_aa1, job_a2 aaa2, job_aa2, job_a2 aaa3,... (5 Replies)
Discussion started by: ken6503
5 Replies

13. Shell Programming and Scripting

Windows Task with Bash script

Hello I have a problem with use bash script in windows task. If I use script by cygwin it's working well. If I use it by Windows task I'm get error Error : ERROR 2 (HY000) at line 2: File '.\xxx.csv' not found (Errcode: 2) Code Line : load data local infile './xxx.csv' REPLACE into... (16 Replies)
Discussion started by: karp
16 Replies

14. UNIX for Beginners Questions & Answers

Eval set -- and more

Hello everyone, I am taking a course on Lynda and they show this code below. I didn't fully understand some parts. Please see the questions within the code. Thank you for your input and time. Regards, function usage { echo Options are -r -h -b -x --branch --version --help --exclude... (9 Replies)
Discussion started by: mohca2020
9 Replies

15. UNIX for Beginners Questions & Answers

Help with the code to do automatic task in plink

Hi, I am newbie tothis forum and also to unix. i wa shownt help in giving me a acceptable code so that i could add it as batch to be included in the task scheduler. i use plink and putty to login to my router. With this i get to the $, linux prompt there i have to issue a command show... (5 Replies)
Discussion started by: jraju
5 Replies