Sponsored Content
Full Discussion: Resolve Environment Variable
Top Forums Shell Programming and Scripting Resolve Environment Variable Post 302596821 by ahamed101 on Wednesday 8th of February 2012 11:14:21 AM
Old 02-08-2012
Can you paste the code snippet around this?... exact code snippet...

--ahamed
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Environment Variable

Hello, I need some help to understand system and user environment files, such as .profile and others. I can edit my .profile file in my home directory. What I only touch in this file is the $PATH variable and when I am logged in under a telnet session, the PATH that I specify is used and... (8 Replies)
Discussion started by: jacobsa
8 Replies

2. UNIX for Dummies Questions & Answers

Environment Variable

$ . oraenv (when i type this at the prompt) ORACLE_SID = ? ( I get this) I understand that . oraenv is a startup script and it has the ENV variable ORACLE_SID. But pls let me know what more it explains and also how to change the env variable here. (2 Replies)
Discussion started by: thumsup9
2 Replies

3. Shell Programming and Scripting

Resolve a Variable

Hi I have a variable which is a path ie: UBERROR=/cobwrk/mchr/prodsup/ub/wrk/../error is there anyway I can get the output of an echo to read: #echo $UBERROR /cobwrk/mchr/prodsup/ub/error instead of #echo $UBERROR /cobwrk/mchr/prodsup/ub/wrk/../error Many thanks! (2 Replies)
Discussion started by: serm
2 Replies

4. Shell Programming and Scripting

environment variable

Hi, I have to set bunch of variables and all other programs like make, perl will use them .. Here are my constraints and requirements ... The variables have to be set by executing a script that runs in c shell. I cannot source the script since people who use this script might be on... (8 Replies)
Discussion started by: sharanbr
8 Replies

5. Shell Programming and Scripting

about environment variable

i am not clear at some places i saw that assigning a env var with colon ':' like export PATH=/usr/bin:/usr/ucb:/etc:/usr/sbin:.:/usr/platform/sun4u/sbin here you can find : and a . and again : could some one explain how it works... see all is starting from root directory, how : is used and... (6 Replies)
Discussion started by: Arunprasad
6 Replies

6. Solaris

Environment Variable

Hi All, I am new to SUN Solaris.I have some questions regarding environment variable.:confused: Q1. Where the environment variables available in Solaris. Q2. What command used here. Q3. Can a user change this .Suppose i want to change the bash to ksh can it be possible here. Or i need to... (2 Replies)
Discussion started by: jdash.ps
2 Replies

7. Shell Programming and Scripting

Expand an environment variable in sed, when the variable contains a slash

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)
Discussion started by: Ilja
2 Replies

8. Shell Programming and Scripting

Resolve variable inside another variable

Hello Everyone, I am trying to resolve a variable inside another variable.Let me go straight to the example. Input: Query=$Table_1 Join $Table_2 (Query itself is a variable here) Now for two different cases I am assigning different values to Table_1 and Table_2 Case 1:... (14 Replies)
Discussion started by: vinay4889
14 Replies

9. Shell Programming and Scripting

Resolve parameter value stored in a variable

Hi All, I have below variable, xyz=\$AI_XFR Now, if you will run the below command => echo $xyz $AI_XFR It is returning hardcoded string value. Whereas in environment, there is value in it. Like below: => echo $AI_XFR /home/aditya/sandbox/xfr/ I need to resolve this... (4 Replies)
Discussion started by: adgangwar
4 Replies

10. Shell Programming and Scripting

Cannot resolve $variable in awk

My script ---------- for i in `cat n`;do export k=`echo "CSN: "$i` //combining CSN: and value from n echo "$k" awk ''{print "CSN: "$0;}'{_=29}_&&_--' file1|tail -1 >> file2 done In the above script i cannot able to resolve $k in awk command file n contains ------------ 0000 1111 2222... (2 Replies)
Discussion started by: Mohana29_1988
2 Replies
Class::MOP::Instance(3) 				User Contributed Perl Documentation				   Class::MOP::Instance(3)

NAME
Class::MOP::Instance - Instance Meta Object VERSION
version 2.0604 DESCRIPTION
The Instance Protocol controls the creation of object instances, and the storage of attribute values in those instances. Using this API directly in your own code violates encapsulation, and we recommend that you use the appropriate APIs in Class::MOP::Class and Class::MOP::Attribute instead. Those APIs in turn call the methods in this class as appropriate. This class also participates in generating inlined code by providing snippets of code to access an object instance. METHODS
Object construction Class::MOP::Instance->new(%options) This method creates a new meta-instance object. It accepts the following keys in %options: o associated_metaclass The Class::MOP::Class object for which instances will be created. o attributes An array reference of Class::MOP::Attribute objects. These are the attributes which can be stored in each instance. Creating and altering instances $metainstance->create_instance This method returns a reference blessed into the associated metaclass's class. The default is to use a hash reference. Subclasses can override this. $metainstance->clone_instance($instance) Given an instance, this method creates a new object by making shallow clone of the original. Introspection $metainstance->associated_metaclass This returns the Class::MOP::Class object associated with the meta-instance object. $metainstance->get_all_slots This returns a list of slot names stored in object instances. In almost all cases, slot names correspond directly attribute names. $metainstance->is_valid_slot($slot_name) This will return true if $slot_name is a valid slot name. $metainstance->get_all_attributes This returns a list of attributes corresponding to the attributes passed to the constructor. Operations on Instance Structures It's important to understand that the meta-instance object is a different entity from the actual instances it creates. For this reason, any operations on the $instance_structure always require that the object instance be passed to the method. $metainstance->get_slot_value($instance_structure, $slot_name) $metainstance->set_slot_value($instance_structure, $slot_name, $value) $metainstance->initialize_slot($instance_structure, $slot_name) $metainstance->deinitialize_slot($instance_structure, $slot_name) $metainstance->initialize_all_slots($instance_structure) $metainstance->deinitialize_all_slots($instance_structure) $metainstance->is_slot_initialized($instance_structure, $slot_name) $metainstance->weaken_slot_value($instance_structure, $slot_name) $metainstance->slot_value_is_weak($instance_structure, $slot_name) $metainstance->strengthen_slot_value($instance_structure, $slot_name) $metainstance->rebless_instance_structure($instance_structure, $new_metaclass) The exact details of what each method does should be fairly obvious from the method name. Inlinable Instance Operations $metainstance->is_inlinable This is a boolean that indicates whether or not slot access operations can be inlined. By default it is true, but subclasses can override this. $metainstance->inline_create_instance($class_variable) This method expects a string that, when inlined, will become a class name. This would literally be something like '$class', not an actual class name. It returns a snippet of code that creates a new object for the class. This is something like " bless {}, $class_name ". $metainstance->inline_get_is_lvalue Returns whether or not "inline_get_slot_value" is a valid lvalue. This can be used to do extra optimizations when generating inlined methods. $metainstance->inline_slot_access($instance_variable, $slot_name) $metainstance->inline_get_slot_value($instance_variable, $slot_name) $metainstance->inline_set_slot_value($instance_variable, $slot_name, $value) $metainstance->inline_initialize_slot($instance_variable, $slot_name) $metainstance->inline_deinitialize_slot($instance_variable, $slot_name) $metainstance->inline_is_slot_initialized($instance_variable, $slot_name) $metainstance->inline_weaken_slot_value($instance_variable, $slot_name) $metainstance->inline_strengthen_slot_value($instance_variable, $slot_name) These methods all expect two arguments. The first is the name of a variable, than when inlined, will represent the object instance. Typically this will be a literal string like '$_[0]'. The second argument is a slot name. The method returns a snippet of code that, when inlined, performs some operation on the instance. $metainstance->inline_rebless_instance_structure($instance_variable, $class_variable) This takes the name of a variable that will, when inlined, represent the object instance, and the name of a variable that will represent the class to rebless into, and returns code to rebless an instance into a class. Introspection Class::MOP::Instance->meta This will return a Class::MOP::Class instance for this class. It should also be noted that Class::MOP will actually bootstrap this module by installing a number of attribute meta-objects into its metaclass. AUTHOR
Moose is maintained by the Moose Cabal, along with the help of many contributors. See "CABAL" in Moose and "CONTRIBUTORS" in Moose for details. COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Infinity Interactive, Inc.. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.16.2 2012-09-19 Class::MOP::Instance(3)
All times are GMT -4. The time now is 07:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy