After my previous thread, I think I found out what causes the long delays.
I run this program on several Linux computers, and the sometimes (after the file with the arrays becomes big) the fwrite takes between 100 ms to 900 ms.
This is very bad for me, as I want a timer to halt each 30 ms.... ... (5 Replies)
Hi,
I am trying to login using ssh on Red Hat Linux 5 server,
The password appears immediately but after I enter the password it takes about 90 seconds to login completely.
Please suggest what changes require?
Regards,
Manoj (4 Replies)
Hi,
I have here a script which is used to purge older files/directories based on defined purge period. The script consists of 45 find commands, where each command will need to traverse through more than a million directories. Therefore a single find command executes around 22-25 mins... (7 Replies)
Hello,
like the title says, how can i measure the time it takes to load a module in Linux, and how how can i measure the time it takes to load a statically compiled module.
/Best Regards Olle
---------- Post updated at 01:13 PM ---------- Previous update was at 11:54 AM ----------
For... (0 Replies)
Dear experts
I have a 200MG text file in this format:
text \tab number
I try to sort using options -fd and it takes very long! is that normal or I can speed it up in some ways?
I dont want to split the file since this one is already splitted.
I use this command: sort -fd file >... (12 Replies)
Hi,
we currently having a issue where when we send jobs to the server for the application lawson, it is taking a very long time to complete. here are the last few lines of the database log.
2012-09-18-10.35.55.707279-240 E244403536A576 LEVEL: Warning
PID : 950492 ... (1 Reply)
Hi,
I wish to check the return value for wget $url.
However, some urls are designed to take 45 minutes or more to return.
All i need to check if the URL can be reached or not using wget.
How can i get wget to return the value in a few seconds ? (8 Replies)
Hi,
Below is my find command
find /opt/app/websphere -name myfolder -perm -600 | wc -l
At time it even takes 20 mins to complete.
my OS is : SunOS mypc 5.10 Generic_150400-09 sun4v sparc SUNW,T5440 (10 Replies)
Hi,
I have a lengthy script which i have trimmed down for a test case as below.
more run.sh
#!/bin/bash
paths="allpath.txt"
while IFS= read -r loc
do
echo "Working on $loc"
startdir=$loc
find "$startdir" -type f \( ! -name "*.log*" ! -name "*.class*" \) -print |
while read file
do... (8 Replies)
I need to check if the files returned by ls command in the below script is a sub-string of the argument passed to the script i.e $1
The below script works fine but is too slow.
If the ls command take 12 secs to complete printing all files with while loop then; using posix substring check... (6 Replies)
Discussion started by: mohtashims
6 Replies
LEARN ABOUT DEBIAN
text::micromason::postprocess
MicroMason::PostProcess(3pm) User Contributed Perl Documentation MicroMason::PostProcess(3pm)NAME
Text::MicroMason::PostProcess - Apply Filters to All Template Output
SYNOPSIS
Instead of using this class directly, pass its name to be mixed in:
use Text::MicroMason;
my $mason = Text::MicroMason->new( -PostProcess );
Use the standard compile and execute methods to parse and evalute templates:
print $mason->compile( text=>$template )->( @%args );
print $mason->execute( text=>$template, @args );
You can define output filters at creation or subsequently:
$mason = Text::MicroMason->new( -PostProcess, post_process => $func );
$mason->post_processors( $func );
$mason->compile( text => $template, post_process => $func );
$mason->execute( text => $template, { post_process => $func }, @args );
DESCRIPTION
This mixin class adds filtering of all template output to any MicroMason class.
Filter functions can accept the string to be output and return a filtered version:
$mason->post_process( sub {
my $foo = shift;
$foo =~ s/a-Z/A-Z/;
return $foo;
} );
If a filter function has an empty prototype, it's assumed to work on $_:
$mason->post_process( sub () {
s/a-Z/A-Z/
} );
Public Methods
post_processors()
Gets and sets the functions to be used for output filtering.
Called with no arguments, returns the list of filter functions:
my @functions = $mason->post_processors();
Called with one array-ref argument, sets the list of filter functions:
$mason->post_processors( @functions );
Called with one or more function-ref arguments, appends to the list:
$mason->post_processors( $filter1, $filter2 );
Supported Attributes
post_process
Stores a reference to a function or an array of functions to be used:
$mason->{post_process} = $function;
$mason->{post_process} = [ $function1, $function2 ];
You can set this attribute when you create your mason object, or in calls to the compile and execute methods.
Private Methods
post_process()
$mason->post_process( $output ) : $filtered_output
Applies the post-processing filter.
SEE ALSO
For an overview of this templating framework, see Text::MicroMason.
This is a mixin class intended for use with Text::MicroMason::Base.
For distribution, installation, support, copyright and license information, see Text::MicroMason::Docs::ReadMe.
perl v5.10.1 2007-01-29 MicroMason::PostProcess(3pm)