Changes between Version 5 and Version 6 of Doc/panc/tips


Ignore:
Timestamp:
Aug 29, 2008, 12:38:01 PM (16 years ago)
Author:
/DC=es/DC=irisgrid/O=uam/CN=luisf-munnoz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Doc/panc/tips

    v5 v6  
    3232}}}
    3333This same technique can be used with any resource (list, nlist, record).
     34
     35= Do not copy SELF =
     36
     37Sometimes we do:
     38
     39{{{
     40
     41"/my/path" = {
     42   temp = SELF;
     43   # Operations with temp
     44   temp["foo"] = "bar";
     45   temp;
     46};
     47}}}
     48
     49This forces a copy of SELF and then assing back to the path. The
     50following alternative is more efficient in speed and memory:
     51
     52{{{
     53
     54"/my/path" = {
     55    SELF["foo"] = "bar";
     56    SELF;
     57};
     58}}}