in reply to Suggestion needed for automating 3 separate programs/components

No need to use perl for that, just use the shell

encoder *.xml | decoder | validator

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan
  • Comment on Re: Suggestion needed for automating 3 separate programs/components
  • Download Code

Replies are listed 'Best First'.
Re^2: Suggestion needed for automating 3 separate programs/components
by cog (Parson) on Nov 29, 2005 at 13:35 UTC
    He/she might not have a shell, and therefore piping may be unavailable.

    Plus, you're assuming the decoder and the validator work line by line, which is probably not the case.

      You're right I cannot know these things, because the OP did not give any information on them In fact he hardly gave any useful information at all, so I proposed a workable solution under some circumstances and I expect he'll deal with the lack of information on his own :-).


      Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan
        Well i have to develop the module to work in windows OS. The three modules - Encoder Decoder and Validator are individually functioning fine. But they have to glued using Perl language.

        Steps involved:-
        1)Select the Encoder Algorithm.
        2)Load the map database of Encoder and Decoder.
        3)Call the encoder function with location as input. The output of the encoder is Location Reference.
        4)Call the decoder function with this Location Reference as input. The output of the decoder is again a location in file called decoded.xml
        5)Compare the input of encoder with output of decoder and validate the result.
        6)Repeat this process continuously for different Locations.

        Pseudo Code:-
        Void setEncoderVersion();
        encoder.init(graph_name1);
        decoder.init(graph_name2) ;
        repeat this for n locations
        {
        LocRef = encoder.doEncode(Loc1) ;
        Loc2 = decoder.doDecode(LocRef) ;
        Result = compare(Loc1, Loc2);
        }

        Hope i have now provided all the information. Looking forward to your valuable suggestions.

        Rgds,
        Ashutosh