tmpdir
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 12
pam_mktemp 1.0.2
pam_mktemp is a PAM module which may be used with a PAM-aware login service to provide per-user private directories under /tmp. more>>
pam_mktemp is a PAM module which may be used with a PAM-aware login service to provide per-user private directories under /tmp as a part of account management or PAM session.
When an interactive (shell) session is started, a directory is created and the environment variables TMPDIR and TMP are set to the name of the directory.
Youre allowed to do whatever you like with this software (including re-distribution in source and/or binary form, with or without modification), provided that credit is given where it is due and any modified versions are marked as such. Theres absolutely no warranty.
Enhancements:
- A workaround for building pam_mktemp on systems with Linux 2.6.x kernel headers has been added.
<<lessWhen an interactive (shell) session is started, a directory is created and the environment variables TMPDIR and TMP are set to the name of the directory.
Youre allowed to do whatever you like with this software (including re-distribution in source and/or binary form, with or without modification), provided that credit is given where it is due and any modified versions are marked as such. Theres absolutely no warranty.
Enhancements:
- A workaround for building pam_mktemp on systems with Linux 2.6.x kernel headers has been added.
Download (0.004MB)
Added: 2006-01-16 License: BSD License Price:
1376 downloads
Pod::PP 0.1.2
Pod::PP is a POD pre-processor. more>>
Pod::PP is a POD pre-processor.
SYNOPSIS
# normally used via the podpp script
require Pod::PP;
my $pp = Pod::PP->make(
-incpath => [h, h/sys],
-symbols => { DIR => "/var/www", TMPDIR => "/var/tmp" },
);
$pp->parse_from_filehandle(*STDIN);
$pp->parse_from_file("file.pp");
The Pod::PP module is a POD pre-processor built on top of Pod::Parser. The helper script podpp provides a pre-processor command for POD, whose interface is very much like cpp, the C pre-processor. However, unlike C, the Pod::PP processing is not normally invoked when parsing POD.
If you wish to automate the pre-processing for every POD file, you need to write .pp files (say) instead of .pod files, and add the following make rules to your Makefile:
PODPP = podpp
PP_FLAGS =
.SUFFIXES: .pp .pod
.pp.pod:
$(PODPP) $(PP_FLAGS) $< >$*.pod
Those teach make how to derive a .pod from a .pp file using the podpp pre-processor.
Pod::PP uses the P notation to request symbol expansion. Since it processes text, you need to tag the symbols to be expanded explicitely. Expansion is done recursively, until there is no more expansion possible.
If you are familiar with cpp, most directives will be easy to grasp. For instance, using the == prefix to make shorter commands:
==pp include "common.pp"
==pp define DIR /var/www
==pp define TMP /tmp
==pp ifdef SOME_COMMON_SYMBOL
==pp define FOO common foo
==pp else
==pp define FOO P
==pp endif
The == notation is not standard POD, but it is understood by Pod::Parser and very convenient when it comes to writing things like the above block, because theres no need to separate commands by blank lines. Since the code is going to be processed by podpp anyway, theres no problem, and podpp will always emit legitimate POD. That is, given the following:
==head1 NAME
Some data
it will re-emit:
=head1 NAME
Some data
thereby normalizing the output. It is guaranteed that after a podpp pass, the output is regular POD. If you make errors in writing the Pod::PP directives, you will not get the expected output, but it will be regular POD.
<<lessSYNOPSIS
# normally used via the podpp script
require Pod::PP;
my $pp = Pod::PP->make(
-incpath => [h, h/sys],
-symbols => { DIR => "/var/www", TMPDIR => "/var/tmp" },
);
$pp->parse_from_filehandle(*STDIN);
$pp->parse_from_file("file.pp");
The Pod::PP module is a POD pre-processor built on top of Pod::Parser. The helper script podpp provides a pre-processor command for POD, whose interface is very much like cpp, the C pre-processor. However, unlike C, the Pod::PP processing is not normally invoked when parsing POD.
If you wish to automate the pre-processing for every POD file, you need to write .pp files (say) instead of .pod files, and add the following make rules to your Makefile:
PODPP = podpp
PP_FLAGS =
.SUFFIXES: .pp .pod
.pp.pod:
$(PODPP) $(PP_FLAGS) $< >$*.pod
Those teach make how to derive a .pod from a .pp file using the podpp pre-processor.
Pod::PP uses the P notation to request symbol expansion. Since it processes text, you need to tag the symbols to be expanded explicitely. Expansion is done recursively, until there is no more expansion possible.
If you are familiar with cpp, most directives will be easy to grasp. For instance, using the == prefix to make shorter commands:
==pp include "common.pp"
==pp define DIR /var/www
==pp define TMP /tmp
==pp ifdef SOME_COMMON_SYMBOL
==pp define FOO common foo
==pp else
==pp define FOO P
==pp endif
The == notation is not standard POD, but it is understood by Pod::Parser and very convenient when it comes to writing things like the above block, because theres no need to separate commands by blank lines. Since the code is going to be processed by podpp anyway, theres no problem, and podpp will always emit legitimate POD. That is, given the following:
==head1 NAME
Some data
it will re-emit:
=head1 NAME
Some data
thereby normalizing the output. It is guaranteed that after a podpp pass, the output is regular POD. If you make errors in writing the Pod::PP directives, you will not get the expected output, but it will be regular POD.
Download (0.017MB)
Added: 2007-05-31 License: Perl Artistic License Price:
876 downloads
PAR::WebStart 0.18
PAR::WebStart is a Perl implementation of Javas WebStart. more>>
PAR::WebStart is a Perl implementation of Javas WebStart.
SYNOPSIS
my $file = hello.pnlp;
my $ws = PAR::WebStart->new(file => $file);
$ws->fetch_pars() or die $ws->{ERROR};
my $tmpdir = $ws->{tmpdir};
chdir($tmpdir) or die qq{Cannot chdir to "$tmpdir": $!});
my @args = @{$ws->run_command()};
die qq{Failed to get WebStart args: $ws->{ERROR}}) unless (@args);
system(@args) == 0 or die qq{Execution of system(@args) failed: $?};
This a Perl version of Javas WebStart technology; see http://java.sun.com/j2se/1.4.2/docs/guide/jws/developersguide/overview.html for details.
PAR-WebStart is a helper application associated with a browser. When a user clicks on a link that points to a PNLP [PAR Network Launch Protocol] launch file (a special XML file), it causes the browser to launch PAR-WebStart, which then automatically downloads, caches, and runs the specified PAR-based application.
<<lessSYNOPSIS
my $file = hello.pnlp;
my $ws = PAR::WebStart->new(file => $file);
$ws->fetch_pars() or die $ws->{ERROR};
my $tmpdir = $ws->{tmpdir};
chdir($tmpdir) or die qq{Cannot chdir to "$tmpdir": $!});
my @args = @{$ws->run_command()};
die qq{Failed to get WebStart args: $ws->{ERROR}}) unless (@args);
system(@args) == 0 or die qq{Execution of system(@args) failed: $?};
This a Perl version of Javas WebStart technology; see http://java.sun.com/j2se/1.4.2/docs/guide/jws/developersguide/overview.html for details.
PAR-WebStart is a helper application associated with a browser. When a user clicks on a link that points to a PNLP [PAR Network Launch Protocol] launch file (a special XML file), it causes the browser to launch PAR-WebStart, which then automatically downloads, caches, and runs the specified PAR-based application.
Download (0.023MB)
Added: 2007-03-23 License: Perl Artistic License Price:
945 downloads
Sophosticated 1.2
Sophosticated consists of two BASH scripts. more>>
Sophosticated consists of two BASH scripts. One script installs Sophos virus scanner updates from CD, while the other downloads, unpacks, and installs the latest IDEs.
These scripts needs BASH or a compatible shell. They were originally made and tested on a Mandrake Linux 8.0 installation (and still work fine up to Mandrake 9.1), so you may need to alter the paths to the utility programs (ls gawk grep mail logger eject) to suit your system. I also installed Sweep in /home/sweep rather than the default directory, which you may not have done. The site I made this for doesnt use InterCheck.
I run auto_update_ides thrice daily and auto_update_sweep daily, the clients staff leave any new Sophos CD in the drive over the weekend so that the update script can see and use it. The example crontab reflects this. To use it as-is (and this presumes that you have nothing else in roots crontab, do "crontab -l" to check), do "crontab crontab" in this directory.
The scripts work for me, they will probably work on any reasonably well-equipped Unix system, and maybe many others such as BeOS, OS/2 and OS/X, but as I said above there is no guarantee or warranty of any kind. If you break it, you get to keep both pieces (under the terms of the GPL, of course).
Yes, this even includes Dohl MacBride and his cronies, to whose level of pettiness and selfishness I refuse to stoop.
Enhancements:
- The "top directory" is now explicitly defined at the top of each script. If you install Sophos in /home/sweep as I do, you will need to edit this. The current settings match Sophos default (/usr/local).
- Since /usr/local/tmp normally doesnt exist, the scripts will use $TMPDIR for scribbling if $TOPDIR/tmp doesnt exist.
<<lessThese scripts needs BASH or a compatible shell. They were originally made and tested on a Mandrake Linux 8.0 installation (and still work fine up to Mandrake 9.1), so you may need to alter the paths to the utility programs (ls gawk grep mail logger eject) to suit your system. I also installed Sweep in /home/sweep rather than the default directory, which you may not have done. The site I made this for doesnt use InterCheck.
I run auto_update_ides thrice daily and auto_update_sweep daily, the clients staff leave any new Sophos CD in the drive over the weekend so that the update script can see and use it. The example crontab reflects this. To use it as-is (and this presumes that you have nothing else in roots crontab, do "crontab -l" to check), do "crontab crontab" in this directory.
The scripts work for me, they will probably work on any reasonably well-equipped Unix system, and maybe many others such as BeOS, OS/2 and OS/X, but as I said above there is no guarantee or warranty of any kind. If you break it, you get to keep both pieces (under the terms of the GPL, of course).
Yes, this even includes Dohl MacBride and his cronies, to whose level of pettiness and selfishness I refuse to stoop.
Enhancements:
- The "top directory" is now explicitly defined at the top of each script. If you install Sophos in /home/sweep as I do, you will need to edit this. The current settings match Sophos default (/usr/local).
- Since /usr/local/tmp normally doesnt exist, the scripts will use $TMPDIR for scribbling if $TOPDIR/tmp doesnt exist.
Download (0.003MB)
Added: 2006-07-12 License: GPL (GNU General Public License) Price:
1200 downloads
Launch4j 3.0.0-pre2
Launch4j is a cross-platform tool for wrapping Java applications distributed as jars in Windows native executables. more>>
Launch4j project is a cross-platform tool for wrapping Java applications distributed as jars in lightweight Windows native executables.
The executable can be configured to search for a certain JRE version or use a bundled one, and its possible to set runtime options, like the initial/max heap size.
The wrapper also provides better user experience through an application icon, a native pre-JRE splash screen, a custom process name, and a Java download page in case the appropriate JRE cannot be found.
Main features:
- Launch4j wraps jars in Windows native executables and allows to run them like a regular Windows program. Its possible to wrap applications on Linux!
- Doesnt extract the jar from the executable.
- Custom application icon with multiple resolutions and color depths.
- Native pre-JRE splash screen in BMP format shown until the Java application starts.
- Process name as the executable filename to easily identify your application.
- Works with a bundled JRE or searches for newest JRE / SDK in given range.
- Opens Java download page if an appropriate Java version cannot be found.
- Supports GUI and console apps.
- Passes command line arguments, also supports constant arguments.
- Allows to set the initial/max heap size.
- JVM options: set system properties, tweak the garbage collection...
- Option to change current directory to the executable location.
- Custom version information shown by Windows Explorer.
- GUI and command line interface.
- Build integration through an Ant task.
- Lightweight: 21 KB!
- Its free and may be used for commercial purposes.
- Includes a sample application and Ant script that automates the build process from Java sources to native executable.
- The wrapped program works on all Windows platforms (98/Me/NT/2K/Xp), launch4j works on NT/2K/Xp, Linux (developed and tested on FC2)
Whats New in 2.1.5 Stable Release:
- Changed the Java download site to http://java.com/download.
- Now its possible to use absolute and relative paths to specify the embedded JRE.
Enhancements:
- Enhanced GUI.
- Redesigned error reporting.
- Added custom error messages.
- Added support website feature.
- Added PWD and OLDPWD special variables and access to the registry.
- Runtime ini file extension changed to .l4j.ini, added comments (#).
- FR #1427811 Initial process priority.
- FR #1547339 Added VarFileInfo structure to Version Info (Stephan Laertz).
- FR #1584295 Updated documentation for --l4j-debug.
- Fixed and config conversion bug (found by Dafe Simonek).
- Fixed the Ant task exception reporting bug, added tmpdir and bindir attributes.
- Fixed bug #1563415 Problem with launching application when ini file exists (found by mojomax).
- Fixed bug #1527619 Console header wildcard expansion (found by erikjv).
- Fixed bug #1544167 NPE when dontwrap and only classpath given (found by Hendrik Schreiber).
- Fixed bug #1584264 Dropdown boxes get mixed up (found by Larsen).
<<lessThe executable can be configured to search for a certain JRE version or use a bundled one, and its possible to set runtime options, like the initial/max heap size.
The wrapper also provides better user experience through an application icon, a native pre-JRE splash screen, a custom process name, and a Java download page in case the appropriate JRE cannot be found.
Main features:
- Launch4j wraps jars in Windows native executables and allows to run them like a regular Windows program. Its possible to wrap applications on Linux!
- Doesnt extract the jar from the executable.
- Custom application icon with multiple resolutions and color depths.
- Native pre-JRE splash screen in BMP format shown until the Java application starts.
- Process name as the executable filename to easily identify your application.
- Works with a bundled JRE or searches for newest JRE / SDK in given range.
- Opens Java download page if an appropriate Java version cannot be found.
- Supports GUI and console apps.
- Passes command line arguments, also supports constant arguments.
- Allows to set the initial/max heap size.
- JVM options: set system properties, tweak the garbage collection...
- Option to change current directory to the executable location.
- Custom version information shown by Windows Explorer.
- GUI and command line interface.
- Build integration through an Ant task.
- Lightweight: 21 KB!
- Its free and may be used for commercial purposes.
- Includes a sample application and Ant script that automates the build process from Java sources to native executable.
- The wrapped program works on all Windows platforms (98/Me/NT/2K/Xp), launch4j works on NT/2K/Xp, Linux (developed and tested on FC2)
Whats New in 2.1.5 Stable Release:
- Changed the Java download site to http://java.com/download.
- Now its possible to use absolute and relative paths to specify the embedded JRE.
Enhancements:
- Enhanced GUI.
- Redesigned error reporting.
- Added custom error messages.
- Added support website feature.
- Added PWD and OLDPWD special variables and access to the registry.
- Runtime ini file extension changed to .l4j.ini, added comments (#).
- FR #1427811 Initial process priority.
- FR #1547339 Added VarFileInfo structure to Version Info (Stephan Laertz).
- FR #1584295 Updated documentation for --l4j-debug.
- Fixed and config conversion bug (found by Dafe Simonek).
- Fixed the Ant task exception reporting bug, added tmpdir and bindir attributes.
- Fixed bug #1563415 Problem with launching application when ini file exists (found by mojomax).
- Fixed bug #1527619 Console header wildcard expansion (found by erikjv).
- Fixed bug #1544167 NPE when dontwrap and only classpath given (found by Hendrik Schreiber).
- Fixed bug #1584264 Dropdown boxes get mixed up (found by Larsen).
Download (1.8MB)
Added: 2006-10-29 License: GPL (GNU General Public License) Price:
1098 downloads
PortScan Plugin 0.0.2a
The port scan plug in for snort, or just portscan for short is intended to be used in conjunction with snort and logcheck. more>>
The port scan plug in for snort, or just portscan for short is intended to be used in conjunction with snort and logcheck. The tool will allow you to monitor your snort log file and then do port scans based upon certain keywords.
This program requires nmap and snort. If you want it to run automatically you will also need logcheck. Hopefully in the future this program will be built to run as a daemon and will no longer rely on logcheck. But for now use logcheck.
Make sure that Snort is set to log to syslog and that you know which syslog file it is logging to. The contents of the file will look like this :
Jul 6 18:34:00 thqms3 snort: IDS126/x11_Outgoing_Xterm: 212.30.119.109:6000 -> 63.80.88.42:33248
To install first run install.sh
After running install.sh you may edit the portscan.conf file in /etc/portscan and the keywords file. After making any necassary changes you will need to add the following lines into your logcheck.sh file
/usr/sbin/portscan.pl &
cat $TMPDIR/checkoutput.$$ > $TMPDIR/portscan.log
So your logcheck.sh file should now look like this (toward the bottom)
<<lessThis program requires nmap and snort. If you want it to run automatically you will also need logcheck. Hopefully in the future this program will be built to run as a daemon and will no longer rely on logcheck. But for now use logcheck.
Make sure that Snort is set to log to syslog and that you know which syslog file it is logging to. The contents of the file will look like this :
Jul 6 18:34:00 thqms3 snort: IDS126/x11_Outgoing_Xterm: 212.30.119.109:6000 -> 63.80.88.42:33248
To install first run install.sh
After running install.sh you may edit the portscan.conf file in /etc/portscan and the keywords file. After making any necassary changes you will need to add the following lines into your logcheck.sh file
/usr/sbin/portscan.pl &
cat $TMPDIR/checkoutput.$$ > $TMPDIR/portscan.log
So your logcheck.sh file should now look like this (toward the bottom)
Download (0.001MB)
Added: 2006-07-10 License: GPL (GNU General Public License) Price:
1204 downloads
File::CounterFile 1.04
File::CounterFile is a persistent counter class. more>>
File::CounterFile is a persistent counter class.
SYNOPSIS
use File::CounterFile;
$c = File::CounterFile->new("COUNTER", "aa00");
$id = $c->inc;
open(F, ">F$id");
This module implements a persistent counter class. Each counter is represented by a separate file in the file system. File locking is applied, so multiple processes can attempt to access a counter simultaneously without risk of counter destruction.
You give the file name as the first parameter to the object constructor (new). The file is created if it does not exist.
If the file name does not start with "/" or ".", then it is interpreted as a file relative to $File::CounterFile::DEFAULT_DIR. The default value for this variable is initialized from the environment variable TMPDIR, or /usr/tmp if no environment variable is defined. You may want to assign a different value to this variable before creating counters.
If you pass a second parameter to the constructor, it sets the initial value for a new counter. This parameter only takes effect when the file is created (i.e. it does not exist before the call).
When you call the inc() method, you increment the counter value by one. When you call dec(), the counter value is decremented. In both cases the new value is returned. The dec() method only works for numerical counters (digits only).
You can peek at the value of the counter (without incrementing it) by using the value() method.
The counter can be locked and unlocked with the lock() and unlock() methods. Incrementing and value retrieval are faster when the counter is locked, because we do not have to update the counter file all the time. You can query whether the counter is locked with the locked() method.
There is also an operator overloading interface to the File::CounterFile object. This means that you can use the ++ operator for incrementing and the -- operator for decrementing the counter, and you can interpolate counters directly into strings.
<<lessSYNOPSIS
use File::CounterFile;
$c = File::CounterFile->new("COUNTER", "aa00");
$id = $c->inc;
open(F, ">F$id");
This module implements a persistent counter class. Each counter is represented by a separate file in the file system. File locking is applied, so multiple processes can attempt to access a counter simultaneously without risk of counter destruction.
You give the file name as the first parameter to the object constructor (new). The file is created if it does not exist.
If the file name does not start with "/" or ".", then it is interpreted as a file relative to $File::CounterFile::DEFAULT_DIR. The default value for this variable is initialized from the environment variable TMPDIR, or /usr/tmp if no environment variable is defined. You may want to assign a different value to this variable before creating counters.
If you pass a second parameter to the constructor, it sets the initial value for a new counter. This parameter only takes effect when the file is created (i.e. it does not exist before the call).
When you call the inc() method, you increment the counter value by one. When you call dec(), the counter value is decremented. In both cases the new value is returned. The dec() method only works for numerical counters (digits only).
You can peek at the value of the counter (without incrementing it) by using the value() method.
The counter can be locked and unlocked with the lock() and unlock() methods. Incrementing and value retrieval are faster when the counter is locked, because we do not have to update the counter file all the time. You can query whether the counter is locked with the locked() method.
There is also an operator overloading interface to the File::CounterFile object. This means that you can use the ++ operator for incrementing and the -- operator for decrementing the counter, and you can interpolate counters directly into strings.
Download (0.005MB)
Added: 2007-04-26 License: Perl Artistic License Price:
911 downloads
Berkeley Yacc
Berkeley Yacc is a high-quality yacc variant. more>>
Berkeley Yacc (byacc) is generally conceded to be the best yacc variant available. In contrast to bison, it is written to avoid dependencies upon a particular compiler.
Byacc was written around 1990 by Robert Corbett who is the original author of bison. Originally written in K&R C, I have modified it to conform to ANSI C, and made other improvements.
Enhancements:
- configure.in: add AC_ARG_PROGRAM to make --program-prefix, etc., work.
- makefile.in: first cut of script to support --program-prefix
- configure.in: reorder AC_INIT/AC_CONFIG_HEADER to make this "work" with autoconf 2.52
- makefile.in: modify so DESTDIR works
- makefile.in: use EXEEXT and OBJEXT
- configure.in: use CF_PROG_EXT generate a config.h
- defs.h: make this use the generated config.h
- skeleton.c: add a forward-reference for yyparse()
- aclocal.m4: add CF_CHECK_CACHE, needed for CF_PROG_EXT
- yacc.1: remove the discussion of TMPDIR since it is obsolete
- skeleton.c: fix a couple of minor compiler-warnings in the skeleton
- defs.h: remove action_file_name, etc., since we use tmpfile() now.
- main.c: use tmpfile() for opening the working files. This quiets an idiot-warning advertising the use of mkstemp().
- output.c: Do not close temporary-files here, since they are opened with tmpfile(). Just rewind them, and theyre ready to read back the data stored in them.
- test/grammar.output, test/grammar.tab.c, test/grammar.tab.h: RCS_BASE
- makefile.in: turn on "make check" rule
- test/calc.output, test/run_test.sh, test/calc.tab.h: RCS_BASE
- test/ftp.tab.c: yyparse() is now yyparse(void)
- test/calc.tab.c: RCS_BASE
- test/error.tab.c: yyparse() is now yyparse(void)
- test/README: RCS_BASE
- yacc.1: various typography fixes prompted by Debian #100947
- aclocal.m4, makefile.in, configure.in: RCS_BASE
- README: updated to note that this is not the original
<<lessByacc was written around 1990 by Robert Corbett who is the original author of bison. Originally written in K&R C, I have modified it to conform to ANSI C, and made other improvements.
Enhancements:
- configure.in: add AC_ARG_PROGRAM to make --program-prefix, etc., work.
- makefile.in: first cut of script to support --program-prefix
- configure.in: reorder AC_INIT/AC_CONFIG_HEADER to make this "work" with autoconf 2.52
- makefile.in: modify so DESTDIR works
- makefile.in: use EXEEXT and OBJEXT
- configure.in: use CF_PROG_EXT generate a config.h
- defs.h: make this use the generated config.h
- skeleton.c: add a forward-reference for yyparse()
- aclocal.m4: add CF_CHECK_CACHE, needed for CF_PROG_EXT
- yacc.1: remove the discussion of TMPDIR since it is obsolete
- skeleton.c: fix a couple of minor compiler-warnings in the skeleton
- defs.h: remove action_file_name, etc., since we use tmpfile() now.
- main.c: use tmpfile() for opening the working files. This quiets an idiot-warning advertising the use of mkstemp().
- output.c: Do not close temporary-files here, since they are opened with tmpfile(). Just rewind them, and theyre ready to read back the data stored in them.
- test/grammar.output, test/grammar.tab.c, test/grammar.tab.h: RCS_BASE
- makefile.in: turn on "make check" rule
- test/calc.output, test/run_test.sh, test/calc.tab.h: RCS_BASE
- test/ftp.tab.c: yyparse() is now yyparse(void)
- test/calc.tab.c: RCS_BASE
- test/error.tab.c: yyparse() is now yyparse(void)
- test/README: RCS_BASE
- yacc.1: various typography fixes prompted by Debian #100947
- aclocal.m4, makefile.in, configure.in: RCS_BASE
- README: updated to note that this is not the original
Download (0.12MB)
Added: 2005-04-13 License: Freely Distributable Price:
1679 downloads
B::LexInfo 0.02
B::LexInfo is a Perl module that shows information about subroutine lexical variables. more>>
B::LexInfo is a Perl module that shows information about subroutine lexical variables.
SYNOPSIS
use B::ShowLex ();
my $lexi = B::ShowLex->new;
Perl stores lexical variable names and values inside a padlist within the subroutine. Certain lexicals will maintain certain attributes after the the variable "goes out of scope". For example, when a scalar is assigned a string value, this value remains after the variable has gone out of scope, but is overridden the next time it is assigned to. Lexical Arrays and Hashes will retain their storage space for the maximum number of entries stored at any given point in time.
This module provides methods to record this information, which can be dumped out as-is or to compare two "snapshots". The information learned from these snapshots can be valuable in a number of ways.
METHODSM
new
Create a new B::LexInfo object:
my $lexi = B::LexInfo->new;
cvlexinfo
Create a padlist snapshot from a single subroutine:
my $info = $lexi->cvlexinfo(Foo::bar);
stash_cvlexinfo
Create a list of padlist snapshots for each subroutine in the given package:
my $info = $lexi->stash_cvlexinfo(Foo);
dumper
Return a reference to a stringified padlist snapshot:
print ${ $lexi->dumper($info) }
diff
Compare two padlist snapshots and return the difference:
my $before = $lexi->stash_cvlexinfo(__PACKAGE__);
... let some code run
my $after = $lexi->stash_cvlexinfo(__PACKAGE__);
my $diff = B::LexInfo->diff($before, $after);
print $$diff;
NOTE: This function relies on the diff -u command. You might need to configure $B::LexInfo::TmpDir and/or $B::LexInfo::DiffCmd to values other than the defaults in LexInfo.pm.
cvrundiff
Take a padlist snapshot of a subroutine, run the subroutine with the given arguments, take another snapshot and return a diff of the snapshots.
my $diff = $lexi->cvrundiff(Foo::bar, "arg1", $arg2);
print $$diff;
Complete example:
package Foo;
use B::LexInfo ();
sub bar {
my($string) = @_;
}
my $lexi = B::LexInfo->new;
my $diff = $lexi->cvrundiff(Foo::bar, "a string");
print $$diff;
Produces:
--- /tmp/B_LexInfo_1848.before Mon Jun 28 19:48:41 1999
+++ /tmp/B_LexInfo_1848.after Mon Jun 28 19:48:41 1999
@@ -2,8 +2,10 @@
{
Foo::bar => {
$string => {
- TYPE => NULL,
- NULL => 0x80efd58
+ TYPE => PV,
+ LEN => 9,
+ PV => a string,
+ CUR => 8
},
__SPECIAL__1 => {
TYPE => NULL,
<<lessSYNOPSIS
use B::ShowLex ();
my $lexi = B::ShowLex->new;
Perl stores lexical variable names and values inside a padlist within the subroutine. Certain lexicals will maintain certain attributes after the the variable "goes out of scope". For example, when a scalar is assigned a string value, this value remains after the variable has gone out of scope, but is overridden the next time it is assigned to. Lexical Arrays and Hashes will retain their storage space for the maximum number of entries stored at any given point in time.
This module provides methods to record this information, which can be dumped out as-is or to compare two "snapshots". The information learned from these snapshots can be valuable in a number of ways.
METHODSM
new
Create a new B::LexInfo object:
my $lexi = B::LexInfo->new;
cvlexinfo
Create a padlist snapshot from a single subroutine:
my $info = $lexi->cvlexinfo(Foo::bar);
stash_cvlexinfo
Create a list of padlist snapshots for each subroutine in the given package:
my $info = $lexi->stash_cvlexinfo(Foo);
dumper
Return a reference to a stringified padlist snapshot:
print ${ $lexi->dumper($info) }
diff
Compare two padlist snapshots and return the difference:
my $before = $lexi->stash_cvlexinfo(__PACKAGE__);
... let some code run
my $after = $lexi->stash_cvlexinfo(__PACKAGE__);
my $diff = B::LexInfo->diff($before, $after);
print $$diff;
NOTE: This function relies on the diff -u command. You might need to configure $B::LexInfo::TmpDir and/or $B::LexInfo::DiffCmd to values other than the defaults in LexInfo.pm.
cvrundiff
Take a padlist snapshot of a subroutine, run the subroutine with the given arguments, take another snapshot and return a diff of the snapshots.
my $diff = $lexi->cvrundiff(Foo::bar, "arg1", $arg2);
print $$diff;
Complete example:
package Foo;
use B::LexInfo ();
sub bar {
my($string) = @_;
}
my $lexi = B::LexInfo->new;
my $diff = $lexi->cvrundiff(Foo::bar, "a string");
print $$diff;
Produces:
--- /tmp/B_LexInfo_1848.before Mon Jun 28 19:48:41 1999
+++ /tmp/B_LexInfo_1848.after Mon Jun 28 19:48:41 1999
@@ -2,8 +2,10 @@
{
Foo::bar => {
$string => {
- TYPE => NULL,
- NULL => 0x80efd58
+ TYPE => PV,
+ LEN => 9,
+ PV => a string,
+ CUR => 8
},
__SPECIAL__1 => {
TYPE => NULL,
Download (0.005MB)
Added: 2007-06-26 License: Perl Artistic License Price:
850 downloads
File::Save::Home 0.08
File::Save::Home is a Perl module to place file safely under user home directory. more>>
File::Save::Home is a Perl module to place file safely under user home directory.
SYNOPSIS
use File::Save::Home qw(
get_home_directory
get_subhome_directory_status
make_subhome_directory
restore_subhome_directory_status
conceal_target_file
reveal_target_file
make_subhome_temp_directory
);
$home_dir = get_home_directory();
$desired_dir_ref = get_subhome_directory_status("desired/directory");
$desired_dir_ref = get_subhome_directory_status(
"desired/directory",
"pseudohome/directory", # two-argument version
);
$desired_dir = make_subhome_directory($desired_dir_ref);
restore_subhome_directory_status($desired_dir_ref);
$target_ref = conceal_target_file( {
dir => $desired_dir,
file => file_to_be_checked,
test => 0,
} );
reveal_target_file($target_ref);
$tmpdir = make_subhome_temp_directory();
$tmpdir = make_subhome_temp_directory(
"pseudohome/directory", # optional argument version
);
In the course of deploying an application on another users system, you sometimes need to place a file in or underneath that users home directory. Can you do so safely?
This Perl extension provides several functions which try to determine whether you can, indeed, safely create directories and files underneath a users home directory. Among other things, if you are placing a file in such a location only temporarily -- say, for testing purposes -- you can temporarily hide any already existing file with the same name and restore it to its original name and timestamps when you are done.
<<lessSYNOPSIS
use File::Save::Home qw(
get_home_directory
get_subhome_directory_status
make_subhome_directory
restore_subhome_directory_status
conceal_target_file
reveal_target_file
make_subhome_temp_directory
);
$home_dir = get_home_directory();
$desired_dir_ref = get_subhome_directory_status("desired/directory");
$desired_dir_ref = get_subhome_directory_status(
"desired/directory",
"pseudohome/directory", # two-argument version
);
$desired_dir = make_subhome_directory($desired_dir_ref);
restore_subhome_directory_status($desired_dir_ref);
$target_ref = conceal_target_file( {
dir => $desired_dir,
file => file_to_be_checked,
test => 0,
} );
reveal_target_file($target_ref);
$tmpdir = make_subhome_temp_directory();
$tmpdir = make_subhome_temp_directory(
"pseudohome/directory", # optional argument version
);
In the course of deploying an application on another users system, you sometimes need to place a file in or underneath that users home directory. Can you do so safely?
This Perl extension provides several functions which try to determine whether you can, indeed, safely create directories and files underneath a users home directory. Among other things, if you are placing a file in such a location only temporarily -- say, for testing purposes -- you can temporarily hide any already existing file with the same name and restore it to its original name and timestamps when you are done.
Download (0.018MB)
Added: 2007-01-27 License: Perl Artistic License Price:
1002 downloads
Java::SJ::Config 0.01
Java::SJ::Config is a Perl module that represents SJ Configuration File. more>>
Java::SJ::Config is a Perl module that represents SJ Configuration File.
It uses XML::XPath to parse configuration files and generates objects to represent the directives.
Unless youre working on the module what you really want to know is what directives are allowed and their meaning. Youre in luck, its below.
VARIABLES
The following variables and their relevant defaults are used by the system. These defaults have been chosen to make it as easy as possible to install SJ on a fairly standard UNIX system and have logs, and directories in places that you would expect to find them.
The full paths that will be used if every default is in effect is also shown below.
dir.base - default /usr/local - full /usr/local
The base directory for the system. This directory is used in conjunction with defaults to find directories if they have not been defined elsewhere.
dir.lib - default ${dir.base}/lib/sj - full /usr/local/lib/sj
The directory to find jar files in.
dir.pid - default ${dir.base}/var/run - full /usr/local/var/run
The directory to store PID files in.
dir.log - default ${dir.base}/var/log/sj - full /usr/local/var/log/sj
The directory to store log files in
dir.script - default ${dir.base}/var/sj/script - full /usr/local/var/sj/script
The directory to store generated script files in.
dir.tmp - default &File::Spec::Functions::tmpdir - full N/A (depends on system)
The directory to store temporary files in.
app.name - no default
The name of the application
app.class - no default
The class file for the application
vm.default - Defined by whichever VM has default=true attribute
The default VM tag to use if none supplied by the application
<<lessIt uses XML::XPath to parse configuration files and generates objects to represent the directives.
Unless youre working on the module what you really want to know is what directives are allowed and their meaning. Youre in luck, its below.
VARIABLES
The following variables and their relevant defaults are used by the system. These defaults have been chosen to make it as easy as possible to install SJ on a fairly standard UNIX system and have logs, and directories in places that you would expect to find them.
The full paths that will be used if every default is in effect is also shown below.
dir.base - default /usr/local - full /usr/local
The base directory for the system. This directory is used in conjunction with defaults to find directories if they have not been defined elsewhere.
dir.lib - default ${dir.base}/lib/sj - full /usr/local/lib/sj
The directory to find jar files in.
dir.pid - default ${dir.base}/var/run - full /usr/local/var/run
The directory to store PID files in.
dir.log - default ${dir.base}/var/log/sj - full /usr/local/var/log/sj
The directory to store log files in
dir.script - default ${dir.base}/var/sj/script - full /usr/local/var/sj/script
The directory to store generated script files in.
dir.tmp - default &File::Spec::Functions::tmpdir - full N/A (depends on system)
The directory to store temporary files in.
app.name - no default
The name of the application
app.class - no default
The class file for the application
vm.default - Defined by whichever VM has default=true attribute
The default VM tag to use if none supplied by the application
Download (0.018MB)
Added: 2007-06-05 License: Perl Artistic License Price:
871 downloads
Debug::FaultAutoBT 0.02
Debug::FaultAutoBT is a Perl module for automatic backtrace extractor on SIGSEGV, SIGBUS, etc. more>>
Debug::FaultAutoBT is a Perl module for automatic backtrace extractor on SIGSEGV, SIGBUS, etc.
SYNOPSIS
use Debug::FaultAutoBT;
use File::Spec::Functions;
my $tmp_dir = File::Spec::Functions::tmpdir;
my $trace = Debug::FaultAutoBT->new(
dir => "$tmp_dir",
#verbose => 1,
#exec_path => /home/stas/perl/bin/perl,
#core_path_base => catfile($tmp_dir, "mycore"),
#command_path => catfile($tmp_dir, "my-gdb-command"),
#debugger => "gdb",
);
# enable the sighandler
$trace->ready();
# or simply:
Debug::FaultAutoBT->new(dir => "$tmp_dir")->ready;
When a signal, that normally causes a coredump, is delivered This module attempts to automatically extract a backtrace, rather than letting the core file be dumped. This has the following benefits:
no need to setup the environment to allow core file dumped. Sometimes people just dont know how to set it up. Sometimes you arent allowed to set it up (e.g., when the webserver environment is not under your control).
if many Perl programs are run in a row and more than one program segfaults its possible to collect all backtraces, rathen then aborting the run on the first segfault or staying with only the last core file, which will overwrite all the previous ones. For example consider a live webserver or a test suite which may segfault many times for different reasons.
for huge core files, this approach saves disk space. And can be a saver when you dont have disk space left for various reasons (passed the quota?), but still have a few kilo-bytes left.
Currently the following signals are trapped:
SIGQUIT
SIGILL
SIGTRAP
SIGABRT
SIGEMT
SIGFPE
SIGBUS
SIGSEGV
SIGSYS
(If you know of other signals that should be trapped let me know. thanks.)
<<lessSYNOPSIS
use Debug::FaultAutoBT;
use File::Spec::Functions;
my $tmp_dir = File::Spec::Functions::tmpdir;
my $trace = Debug::FaultAutoBT->new(
dir => "$tmp_dir",
#verbose => 1,
#exec_path => /home/stas/perl/bin/perl,
#core_path_base => catfile($tmp_dir, "mycore"),
#command_path => catfile($tmp_dir, "my-gdb-command"),
#debugger => "gdb",
);
# enable the sighandler
$trace->ready();
# or simply:
Debug::FaultAutoBT->new(dir => "$tmp_dir")->ready;
When a signal, that normally causes a coredump, is delivered This module attempts to automatically extract a backtrace, rather than letting the core file be dumped. This has the following benefits:
no need to setup the environment to allow core file dumped. Sometimes people just dont know how to set it up. Sometimes you arent allowed to set it up (e.g., when the webserver environment is not under your control).
if many Perl programs are run in a row and more than one program segfaults its possible to collect all backtraces, rathen then aborting the run on the first segfault or staying with only the last core file, which will overwrite all the previous ones. For example consider a live webserver or a test suite which may segfault many times for different reasons.
for huge core files, this approach saves disk space. And can be a saver when you dont have disk space left for various reasons (passed the quota?), but still have a few kilo-bytes left.
Currently the following signals are trapped:
SIGQUIT
SIGILL
SIGTRAP
SIGABRT
SIGEMT
SIGFPE
SIGBUS
SIGSEGV
SIGSYS
(If you know of other signals that should be trapped let me know. thanks.)
Download (0.015MB)
Added: 2007-05-01 License: Perl Artistic License Price:
906 downloads
Secleted [ 0 ] software to compare
- Page: 1 of 1
- 1
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above tmpdir search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed