in reply to Re: Windows 7
in thread Windows 7

Hello Chris..below is line 101 in which the error is referring too:

open(STDOUT, '>>', 'sbguioutput.txt') or die "Can't open log"; # Regul +ar Output open(STDERR, '>>', 'sbguierror.txt') or die "Can't open log"; # Error + Output

My guess is file permissions? Thanks!

Replies are listed 'Best First'.
Re^3: Windows 7
by NetWallah (Canon) on Dec 06, 2013 at 07:00 UTC
            My guess is file permissions?

    You wouldn't have to "guess" if you displayed the error message from the OS.
    Change your code to:

    open(STDOUT, '>>', 'sbguioutput.txt') or die "Can't open log:$!"; # +Note $! added
    FYI -MAD info from http://perldoc.perl.org/perl594delta.html#MAD

    MAD, which stands for Misc Attribute Decoration, is a still-in-development work leading to a Perl 5 to Perl 6 converter. To enable it, it's necessary to pass the argument -Dmad to Configure. The obtained perl isn't binary compatible with a regular perl 5.9.4, and has space and speed penalties; moreover not all regression tests still pass with it.

                 When in doubt, mumble; when in trouble, delegate; when in charge, ponder. -- James H. Boren

      Well done, NetWallah.

      Even tho this wasn't my issue, I really appreciate your clarification.

      +'s to you. :)

      --Chris

      Hey. I'm not completely useless. I can be used as a bad example.
      
      So, it looks like you (PilotinControl) have a perl configured with -Dmad. ("To enable it, it's necessary to pass the argument -Dmad to Configure.".) This is an esoteric option related to source code transformation; you must have enabled it somehow.

      Perhaps you were interested in P6 years ago and installed or configured something related to that? Or perhaps you've installed some automated refactoring thing?

      Then again, I don't know how that could/would carry over from your XP setup to your Win 7 setup.

      Given that MAD normally creates a bunch of overhead (making perl run more slowly and use more memory) and typically doesn't provide any benefit, you should figure out how to switch it off. As a bonus, that should fix your problem too.

      If you decide to leave MAD on, then I think you need to figure out in to which directory perl writes the file specified in PERL_XMLDUMP. Does the perl process you're running have permission to write to that directory? Windows 7 tightened up permissions considerably compared to XP.

      Hth.


      Not that it's relevant to the OP, but for completeness sake, from #perl6 log, Aug 22, 2013:

      17:14 TimToady well, I'm not necessarily recommending the MAD approach these days,
                     since it turned out to be rather fragile
      

      While Larry has previously suggested it was best to leave the MAD code and configure option in perl5 core for the time being, I think that suggestion is now somewhat stale. In the above log Larry (quite sensibly imo) suggests one day leveraging FROGG's v5 for translation. Such a translator would not use MAD. Also, fglock started a perlito based translator a couple months back -- and it won't use MAD either. Finally, in August (and the above IRC log) Util talked about creating a translator (Blue_Tiger) that could theoretically use MAD -- but he said he thought PPI was good enough.

        First thing I did was download the newest version of Activestate Perl to Windows 7 which is a newer version than I have on my current windows XP machine. Then I just copied (bad idea now since windows is more tight with its permissions as I am finding out with using other programs) over the folder from XP to 7. So yes its partially the permissions factor. I will also go through the perl setup process to determine if MAD was configured automatically when installed on Win 7. Thanks for the comments and suggestions.

      I did confirm this: Windows XP is running Active State Perl 5.10 and Windows 7 is running version 5.18 so I am assuming outside of the Windows Versions along with the different Perl versions has a lot to do with this?

Re^3: Windows 7
by taint (Chaplain) on Dec 06, 2013 at 03:30 UTC

    Ugh. I really do want to help. But I'm going to need information you're not providing.

    Let's see if I can steer this in a more effective direction. :)

    You indicate you used to be on XP, but now you're on Windows 7.
    That's nice, but tell's me nothing about the Perl on XP, nor on your Windows 7.
    Did you upgrade XP to Windows 7? Did Windows upgrade also upgrade Perl?
    No? Then did you upgrade Perl on Windows 7? If so. How did you do it?
    Starting to catch my drift now? :)

    Did you install Perl on Windows 7? What Perl did you install/upgrade; Strawberry? ActivePerl? What version?

    The more information you can provide. The better we can help. There is no such thing as too much information. :)

    I'll keep watching, in hopes you'll have some better information to go on. :)
    Best wishes.

    --Chris

    Hey. I'm not completely useless. I can be used as a bad example.
    

      Yes I was on Windows XP using Active State Perl. I recently activated a computer using Windows 7 installing the recent version of Active State Perl. I installed all the packages/modules needed to run my script on Windows 7 as I did on Windows XP. I transferred my script from XP to 7 and when executed resulted in the errors earlier posted. I hope that helps explain things a little more. The scripts are totally identical. Thanks for helping

        OK. Great to know.

        I see in the error:
        ?Error: Can't open log at C:\PerlScript\.pl line 101 <#1> <F> You tried to run a perl built with MAD"
        a reference to MAD. I'm afraid I'm not familiar with that. I see no evidence on CPAN. Is it possible you used different options when you built/installed Perl on XP. That you didn't on Windows 7?

        Given everything you provided. That is the only thing I can come up with.

        HTH

        --Chris

        Hey. I'm not completely useless. I can be used as a bad example.