in reply to Inline::Files unopened filehandle errors redux

Your question is answered (obliquely) by reading the section of the POD entitled "Writable virtual files".

By default, the virtual files are opened in readonly mode, and when you read past the EOF, they are closed. It is not enough to just rewind (seek FILE, 0, 0;), you also need to re-open the file for write or read-write access.

This is not a complete answer, The affect of the above is to cause multiple __CONFIG__ sections to be written. I think that is a bug. I think the module suffers a severe lack of maintenance.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP PCW It is as I've been saying!(Audio until 20090817)

Replies are listed 'Best First'.
Re^2: Inline::Files unopened filehandle errors redux
by NateTut (Deacon) on Oct 16, 2009 at 22:08 UTC
    I saw that, but when I try to re-open the virtual file I get:

    Variable "$CONFIG" is not imported at Change__DATA__.pl line 25. Global symbol "$CONFIG" requires explicit package name at Change__DATA +__.pl line 25. Execution of Change__DATA__.pl aborted due to compilation errors.

    I have tried various tricks to get it to open to no avail. The weird thing is that if it only reads one line you can still write.
      but when I try to re-open the virtual file I get: Variable "$CONFIG" is not imported

      Yes. That's what I get with 5.10 also. It never used to happen. From mmeory, it worked correctly circa 5.8.1|2£|4|5'ish. But my memory is fallible and I don't have the capacity to test that aassertion.

      I tried adding our $CONFIG; at the top of the file and that changes the problem to:

      Use of uninitialized value $CONFIG in concatenation (.) or string

      But doesn't fix it entirley.

      Like I said, I think that it suffers from a lack of ongoing maintenance. As with s many of theDamian's modules.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.
        I think that it suffers from a lack of ongoing maintenance. As with s many of theDamian's modules.

        That may be generally true, but in this case the maintainer isn't Damian, it's Alberto Simões. Who most recently released an update in May this year. And who can't really be blamed for this problem either, since no bug report has been filed on this issue.