Hi, I am trying to use swremove to remove some old software packages before an upgrade. I keep getting the same error below. I have restarted swagent, i have killed the swagent process and started it, and I have restarted the entire system. I have now run out of ideas. Anyone know what the problem... (0 Replies)
Hi, I am trying to use swremove to remove some old software packages before an upgrade. I keep getting the same error below. I have restarted swagent, i have killed the swagent process and started it, and I have restarted the entire system. I have now run out of ideas. Anyone know what the problem... (2 Replies)
Dear friends,
I am transferring some files to a windows system from Unix m/c thru FTP Script given below.
echo "open $host
quote USER $userid
quote PASS $pwd
$verbose
$type
cd $dir
bin
put $file
close
quit"|$ftp... (0 Replies)
I hope to post in the right forum, otherwise I apologize for this.
if a MMU exception is caused by a process which tries to access to other memory segment (out of its own address space) what the kernel does in this case ?
maybe kernel kills the "bad" process ? (2 Replies)
Sometimes when I try to use curl to upload to an ftp server, I get the message:
$curl -T file.wmv ftp.eu.filesonic.com --user user:password
curl: (8) Got a 421 ftp-server response when 220 was expected
How do I get the script to try again if I get the message curl: (8)? (2 Replies)
Hello All,
I have a question ....which I am totally confused about!
If I have a fxn foo in a program which returns a logical value. But it has a posssiblity to throw some exception.
Now my exception handler returns a value as a string stating why the exception occured.
But my... (1 Reply)
Hi all,
An application works well under 2.6 but under 7 it gives TEXT_IO exceptions. (Is_Open, Check_Is_Open, Get_Line procedures). Any idea?
Regards (3 Replies)
Hi Folks,
please advise , I have logs generated on unix machine at location /ops/opt/aaa/bvg.log , now sometimes there come exception in these logs also, so I want to write such a script such that it should continuously monitor these logs and whenever any exception comes that is it try to find... (3 Replies)
Discussion started by: tuntun27272727
3 Replies
LEARN ABOUT DEBIAN
devel::repl::profile
Devel::REPL::Profile(3pm) User Contributed Perl Documentation Devel::REPL::Profile(3pm)NAME
Devel::REPL::Profile - code to execute when re.pl starts
SYNOPSIS
package Devel::REPL::Profile::MyProject;
use Moose;
use namespace::clean -except => [ 'meta' ];
with 'Devel::REPL::Profile';
sub apply_profile {
my ($self, $repl) = @_;
# do something here
}
1;
DESCRIPTION
For particular projects you might well end up running the same commands each time the REPL shell starts up - loading Perl modules, setting
configuration, and so on.
A mechanism called profiles exists to let you package and distribute these start-up scripts, as Perl modules.
USAGE
Quite simply, follow the "SYNOPSIS" section above to create a boilerplate profile module. Within the "apply_profile" method, the $repl
variable can be used to run any commands as the user would, within the context of their running "Devel::REPL" shell instance.
For example, to load a module, you might have something like this:
sub apply_profile {
my ($self, $repl) = @_;
$repl->eval('use Carp');
}
As you can see, the "eval" method is used to run any code. The user won't see any output from that, and the code can "safely" die without
destroying the REPL shell. The return value of "eval" will be the return value of the code you gave, or else if it died then a
"Devel::REPL::Error" object is returned.
If you want to load a "Devel::REPL" plugin, then use the following method:
$repl->load_plugin('Timing');
The "load_plugin" and "eval" methods should cover most of what you would want to do before the user has access to the shell. Remember that
plugin features are immediately available, so you can load for example the "LexEnv" plugin, and then declare "my" variables which the user
will have access to.
Selecting a Profile
To run the shell with a particular profile, use the following command:
system$ re.pl --profile MyProject
Alternatively, you can set the environment variable "DEVEL_REPL_PROFILE" to MyProject.
When the profile name is unqualified, as in the above example, the profile is assumed to be in the "Devel::REPL::Profile::" namespace.
Otherwise if you pass something which contains the "::" character sequence, it will be loaded as-is.
AUTHOR
Matt S Trout - mst (at) shadowcatsystems.co.uk (<http://www.shadowcatsystems.co.uk/>)
LICENSE
This library is free software under the same terms as perl itself
perl v5.14.2 2012-06-02 Devel::REPL::Profile(3pm)