I stumbled on this feature on a SLES10 system yesterday... if you tar tf filename.tar.gz or tar xf filename.tar.gz it automatically gunzips the data for you. Has this feature been around for a while? I have 1.12 on my system, which doesn't, but the 1.20 manual mentions it... (3 Replies)
Hey, for the purpose of a research project I need to know if a specific type of parallel processing is being utilized by any user-run programs. Is there a way to detect whether a program either returns a value to another program at the end of execution, or just utilizes any form of parallel... (4 Replies)
Hi all...
(Apologies for any typos at all.)
This is a step by step _script_ to check if your Arduino is talking to your Linux or Macbook Pro computer using the Terminal...
It works on at least 3 Linux flavours and now the Macbook Pro...
I hope you find it useful as a simple check for... (0 Replies)
This is a very simple starter DEMO to access Arduino Diecimila Board for the
Macbook Pro 13" OSX 10.7.5...
A potentiometer is connected between 5V and Gnd with the wiper connected to
ANALOG IN 0 on the Arduino. This was adjusted to give the Ms and Ls as seen...
I now have DC in for this... (0 Replies)
In my further exploration of Arduino, today I decided to install the arduino-cli on my mac today.
https://github.com/arduino/arduino-cli
I followed the instructions for macOS but when I got to this part:
arduino-cli board list
I got the dreaded "Unknown" Fully Qualified Board Name... (1 Reply)
HI all...
(Apologies for any typos.)
To add to Neo's Arduino subject matter I have decided to upload this in ".zip" format.
Ignore "*.info" files these are AMIGA icons only and also the "HAM" drawer as these are photos in ancient AMIGA HAM modes.
I have noticed that there are current... (6 Replies)
Just finished a quick Python script to send the current unix time over to the Arduino from macOS, so in the absence of GPS or some other way to get the unix timestamp (epoch time) to the Arduino, I can get my macOS and Arduino UNO synced to within a second.
Normally, when the Arduino starts... (9 Replies)
Normally I'm not into kits, but I thought my wife would enjoy this one since she is a big fan of robots and droids on StarWars!
We are done with the basic mechanical assembly and starting on the electronics assembly today.
The robot's "brain" consists of three levels. The Arduino board, on... (5 Replies)
Discussion started by: Neo
5 Replies
LEARN ABOUT MOJAVE
scope::guard
Scope::Guard(3) User Contributed Perl Documentation Scope::Guard(3)NAME
Scope::Guard - lexically-scoped resource management
SYNOPSIS
my $guard = guard { ... };
# or
my $guard = scope_guard &handler;
# or
my $guard = Scope::Guard->new(sub { ... });
$guard->dismiss(); # disable the handler
DESCRIPTION
This module provides a convenient way to perform cleanup or other forms of resource management at the end of a scope. It is particularly
useful when dealing with exceptions: the "Scope::Guard" constructor takes a reference to a subroutine that is guaranteed to be called even
if the thread of execution is aborted prematurely. This effectively allows lexically-scoped "promises" to be made that are automatically
honoured by perl's garbage collector.
For more information, see: <http://www.drdobbs.com/cpp/184403758>
METHODS
new
my $guard = Scope::Guard->new(sub { ... });
# or
my $guard = Scope::Guard->new(&handler);
The "new" method creates a new "Scope::Guard" object which calls the supplied handler when its "DESTROY" method is called, typically at the
end of the scope.
dismiss
$guard->dismiss();
# or
$guard->dismiss(1);
"dismiss" detaches the handler from the "Scope::Guard" object. This revokes the "promise" to call the handler when the object is destroyed.
The handler can be re-enabled by calling:
$guard->dismiss(0);
EXPORTS
guard
"guard" takes a block and returns a new "Scope::Guard" object. It can be used as a shorthand for:
Scope::Guard->new(...)
e.g.
my $guard = guard { ... };
Note: calling "guard" anonymously, i.e. in void context, will raise an exception. This is because anonymous guards are destroyed
immediately (rather than at the end of the scope), which is unlikely to be the desired behaviour.
scope_guard
"scope_guard" is the same as "guard", but it takes a code ref rather than a block. e.g.
my $guard = scope_guard &handler;
or:
my $guard = scope_guard sub { ... };
or:
my $guard = scope_guard $handler;
As with "guard", calling "scope_guard" in void context will raise an exception.
VERSION
0.20
SEE ALSO
o B::Hooks::EndOfScope
o End
o Guard
o Hook::Scope
o Object::Destroyer
o Perl::AtEndOfScope
o ReleaseAction
o Scope::local_OnExit
o Scope::OnExit
o Sub::ScopeFinalizer
o Value::Canary
AUTHOR
chocolateboy <chocolate@cpan.org>
COPYRIGHT
Copyright (c) 2005-2010, chocolateboy.
This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.
perl v5.18.2 2010-05-16 Scope::Guard(3)