Hello,
i have another sed question.. I'm trying to do variable substition with sed and i'm running into a problem.
my var1 is a string constructed like this:
filename1 filerev1 filepath1
my var2 is another string constructed like this:
filename2 filerev2 filepath2
when i do... (2 Replies)
I know, and I apologise for using the W word, but I have users asking if they can use my gawk scripts, but I just know they're not going to like using the DOS command line.
Is there any way for me to run my gawk scripts from a gui? Even if it's from a web page (html, php, what ever). I do not... (3 Replies)
Hi all,
I am running a Java program on a Linux server in which I read in a base directory path from the *.properties file. During processing, I build a unique file name and create a file to save data, concatenating the directory path and the file name. Works fine, except that I now need to... (2 Replies)
Hi,
Currently my website is hosted on Linux-Apache environment. If I try to access a file on a website named "Read.txt" as http://xyz.com/READ.txt, I get an error message "Page Not Found". Only way to access is http://xyz.com/Read.txt. How do I make URLS (File Names and Folder Names)... (1 Reply)
How can i set a environment variable in unix shell ?? I can set it using setenv or export but when i close & open the terminal again i couldn't see that environment variable, how can i make that change permanent ?? (1 Reply)
I'm trying to make a sed substitution where the substitution pattern is an environment variable to be expanded, but the variable contains a "slash".
sed -e 's/<HOME_DIRECTORY>/'$HOME'/'This gives me the following error:
sed: -e expression #1, char 21: unknown option to `s'Obviously this is... (2 Replies)
Hi,
I have a make file which I try to execute, but it failed when it arrived to the line:
for r in ${PIPESTATUS
}; do if (($r != 0)); then exit $r; fi;done;
With the Error:
""make:/bin/sh: Bad substitution""
Or the Error:
"make:${PIPESTATUS[...}: Bad substitution"
(Depend on the operating... (3 Replies)
I want to set a enviroment variable
VDC_DIR to a particular directory.
I am doing it as
export VDC_DIR=/abc
it gets set but when i logout and do relogin than its not there.
one way could be setting it in .profile file.
but i have seen it on another box where it is not present in... (2 Replies)
Hi,
I've came across an issue with a script I've been writing to check DHCP addresses on an Solaris system, the script has been running reasonably well, until it hit the following problem:
./sub_mon_v2: redirection error: cannot duplicate fd: Too many open files
./sub_mon_v2: cannot make... (3 Replies)
Hi,
I meet an problem that it cannot change Terminal environment variable in a perl or bash script.
This change can only exist and become effective in script lifetime.
But I want to make this change take effect in current opened Terminal.
In our view, the thought seems to be impossible,
As... (9 Replies)
Discussion started by: weichanghe2000
9 Replies
LEARN ABOUT DEBIAN
perl::critic::policy::modules::requireversionvar
Perl::Critic::Policy::Modules::RequireVersionVar(3pm) User Contributed Perl Documentation Perl::Critic::Policy::Modules::RequireVersionVar(3pm)NAME
Perl::Critic::Policy::Modules::RequireVersionVar - Give every module a "$VERSION" number.
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
Every Perl file (modules, libraries, and programs) should have a package-scoped $VERSION variable. The $VERSION allows clients to insist
on a particular revision of your file like this:
use SomeModule 2.4; #Only loads version 2.4
This Policy scans your file for any package variable named $VERSION. I'm assuming that you are using "strict", so you'll have to declare
it like one of these:
our $VERSION = 1.0611;
$MyPackage::VERSION = 1.061;
use vars qw($VERSION);
use version; our $VERSION = qv(1.0611);
Perl's version system does not recognize lexical variables such as
my $VERSION = 1.0611;
so they are not accepted by this policy.
A common practice is to use the "$Revision: 4106 $" keyword to automatically define the $VERSION variable like this:
our ($VERSION) = '$Revision: 4106 $' =~ m{ $Revision: s+ (S+) }x;
CONFIGURATION
This Policy is not configurable except for the standard options.
NOTES
Conway recommends using the "version" pragma instead of raw numbers or 'v-strings.' However, this Policy only insists that the $VERSION be
defined somehow. I may try to extend this in the future.
TO DO
Add check that $VERSION is independently evaluatable. In particular, prohibit this:
our $VERSION = $Other::Module::VERSION;
This doesn't work because PAUSE and other tools literally copy your version declaration out of your module and evaluates it in isolation,
at which point there's nothing in "Other::Module", and so the $VERSION is undefined.
AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>
COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license
can be found in the LICENSE file included with this module.
perl v5.14.2 2012-06-07 Perl::Critic::Policy::Modules::RequireVersionVar(3pm)