in reply to Re^5: Identifying functions in a c file and replacing with a keyword
in thread Identifying functions in a c file and replacing with a keyword

My apologies for not explaining clearly. This is the first time, I used or observed the CPAN modules. So, I installed ActiveStatePerl 5.16 version from web.And since I got the error related to unable to locate C/Scan.pm file while executing the code, I initially, downloaded the C-Scan-0.74.tar.gz and unzipped the folder. And did the following steps to install
cd C-Scan-0.74\C-Scan-0.74 Makefile.PL -> Here I got a Warning: prerequisite Data::Flow 0.05 no +t found.
so, downloaded Data-Flow-1.02.tar.gz and followed makefile.pl followed by dmake install for both the modules.Still I was getting while compiling my perl code. But then when you asked me to explain the steps that I did, I just tried to add
#use lib '../C-Scan-0.74/C-Scan-0.74/blib/lib'; #use lib '../Data-Flow-1.02/Data-Flow-1.02/blib/lib';
I could compile my code and things work fine. Now I shall check for my expected behavior out of the script and let you know. But if not for explaining you, I wouldn't have got things working.

Replies are listed 'Best First'.
Re^7: Identifying functions in a c file and replacing with a keyword
by marto (Cardinal) on Mar 18, 2013 at 13:51 UTC

    Thanks for the reply. If these modules have been installed properly there's no reason you should have to add the use lib lines. If you're willing to delve deaper into this I can offer further assistance. Obviously adding a new use lib line isn't something you want to have to do each time you want to use a non core module.

    Consider taking my previous advice and run the following from the command prompt:

    c:\cpan C::Scan

    This should detect and install missing prerequisites automatically, saving you the time consuming process of downloading and instaling them by hand. ActiveState also has ppm which you may want to look into.

      Sir, I tried as you had suggested. Following is the error message that I am getting. I tried searching , but no clue.
      C:\Perl\bin>cpan C::Scan Set up gcc environment - 4.4.7 20111023 (prerelease) [svn/rev.180339 - + mingw-w64/oz] ←[32mCPAN: Term::ANSIColor loaded ok (v3.02)←[0m ←[32mCPAN: Storable loaded ok (v2.34)←[0m ←[32mCPAN: LWP::UserAgent loaded ok (v6.04)←[0m ←[32mCPAN: Time::HiRes loaded ok (v1.9725)←[0m ←[32mFetching with LWP: http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz←[0m ←[32mLWP failed with code[500] message[Can't connect to proxy.my +corp.com:8080 (Bad hostname)]←[0m Proxy authentication needed! (Note: to permanently configure username and password run o conf proxy_user your_username o conf proxy_pass your_password )

        cpan explicitly tells you what the problem is, and a solution. cpan also has a section of the documentation dedicated to working behind firewalls/proxys. I suggest you try this for yourself first of all. If still in doubt contact your systems administrator. If you don't resolve this issue with module installation you're going ot be making life difficult for yourself, or at the very least making more boring repetitive work for yourself :)

Re^7: Identifying functions in a c file and replacing with a keyword
by syphilis (Archbishop) on Mar 18, 2013 at 23:27 UTC
    downloaded Data-Flow-1.02.tar.gz and followed makefile.pl followed by dmake install for both the modules

    That should have worked. One would normally run 'dmake test' (to check that the module tests correctly) before running 'dmake install' but, as best I can tell, what you did should have resulted in a successful install - with no need to 'use lib'.

    Is the .PL extension associated with ActiveStatePerl 5.16 ?
    If it's associated with another perl installation, then 'dmake install' would have installed the modules into that "other" perl installation.
    When you run 'dmake install', it will tell you where it's installing the files - make sure they're going where you expect.

    Cheers,
    Rob