Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Is it possible to modify __DATA__ via the DATA file handle or otherwise?

by sundialsvc4 (Abbot)
on Feb 09, 2018 at 19:29 UTC ( #1208857=note: print w/replies, xml ) Need Help??


in reply to Is it possible to modify __DATA__ via the DATA file handle or otherwise?

I strongly recommend that, if the data can be changed, it belongs in an external file ... not in the Perl source-code.   In many shops, source-code is both version-controlled and write-protected, for very obvious reasons.   Source-code is sacrosanct, and data which occurs within the source-code file is “part of the source-code.”   If, instead, it is “really data,” IMHO it does not belong there.   (To me, the __DATA__ construct serves the very-useful purpose that DATA statements served in the BASIC programs of yesteryear ... as a convenient place to store fixed data that was used for initialization or reference purposes.)
  • Comment on Re: Is it possible to modify __DATA__ via the DATA file handle or otherwise?

Replies are listed 'Best First'.
Re^2: Is it possible to modify __DATA__ via the DATA file handle or otherwise?
by Anonymous Monk on Feb 10, 2018 at 17:42 UTC

    BASIC programs of yesteryear ...

    So you also pretend to know BASIC?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1208857]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2018-05-24 05:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?