Hi
Could be stupid, but I can figure out... I have a script that downloads a file from a http server ( virus definitions file ). The thing is that when I run it from the console (bash) works fine, but when I put it in the root's cron it doesn't, and it generates a core file.
example:
... (8 Replies)
Dear Friends,
I am having a crazy issue with ftp.
I am doing 'mput' of 4 files (z1, z2, z3, z4) as below. But ftp transfers only every alternative file !! - ie; If I do mput z* for above, it sends only z1 and z3. Note that all the files are same and I tried this for several dummy files. All... (3 Replies)
well, Wine is simply amazing.. I love it.
the filesystems are great too -- never having to defragment, and not slowing down in time.
I love the power of BASH.
iptables..
but.. I had a vision. a crazy dream.
what if, we could develop an installation system for Linux.. working pretty much... (3 Replies)
Two things : On the first place i am really desperate, on the second i am about to throw my laptop away to the recycle bin in a while.
Ok now that i expressed my feeling let me describe you this mad situation.
Code:
print $1;
("finger -m " $1 "| head -1") | getline userinfo
print... (6 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Create a script called DOTS that will display the horizontal or vertical number of dots if the first argument... (3 Replies)
Hello people,
as wrote in title I'm going crazy with a "complex" SQL select.
This is the seelct:
select T_ADDRESS, T_MCC,T_MNC,T_MSIN,T_IM_MNC, COUNT(*) FROM TABLETEST
WHERE T_MCC=123 AND (T_MNC=11 OR T_MNC=01)
GROUP BY T_ADDRESS,T_MCC,T_MNC,T_MSIN,T_IM_MNC HAVING count(*) > 5;This select... (7 Replies)
Hello All,
was looking at a script wrote by someone and when I try and run it in ksh it gives me an error. Could ksh version be a problem or is there something wrong that I'm missing, when I run it from the command line it works. Thanks!
results=`sudo -u admin ssh... (1 Reply)
Discussion started by: akechnie
1 Replies
LEARN ABOUT DEBIAN
accessors::classic
accessors::classic(3pm) User Contributed Perl Documentation accessors::classic(3pm)NAME
accessors::classic - create 'classic' read/write accessor methods in caller's package.
SYNOPSIS
package Foo;
use accessors::classic qw( foo bar baz );
my $obj = bless {}, 'Foo';
# always return the current value, even on set:
$obj->foo( 'hello ' ) if $obj->bar( 'world' ) eq 'world';
print $obj->foo, $obj->bar, $obj->baz( "!
" );
DESCRIPTION
The accessors::classic pragma lets you create simple classic Perl accessors at compile-time.
The generated methods look like this:
sub foo {
my $self = shift;
$self->{foo} = shift if (@_);
return $self->{foo};
}
They always return the current value.
Note that there is no dash ("-") prepended to the property name as there are in accessors. This is for backwards compatibility.
PERFORMANCE
There is little-to-no performace hit when using generated accessors; in fact there is usually a performance gain.
o typically 5-15% faster than hard-coded accessors (like the above example).
o typically 1-15% slower than optimized accessors (less readable).
o typically a small performance hit at startup (accessors are created at compile-time).
o uses the same anonymous sub to reduce memory consumption (sometimes by 80%).
See the benchmark tests included with this distribution for more details.
CAVEATS
Classes using blessed scalarrefs, arrayrefs, etc. are not supported for sake of simplicity. Only hashrefs are supported.
AUTHOR
Steve Purkis <spurkis@cpan.org>
SEE ALSO
accessors, accessors::rw, accessors::ro, accessors::chained, base
perl v5.12.4 2011-10-16 accessors::classic(3pm)