kraih/mojo — pull request #696 by kiwiroy (2014-10-27 10:01:50+00:00)
Title: -w Mojo::Asset::File (again)...

An answer for #649 with revert of 04aa323e plus augmenting similar to [comment](https://github.com/kraih/mojo/pull/649#issuecomment-59644444) and as an alternative to interface change of #694, though not really feedback as such.

Whether all files that *can be* opened in append|write mode *should be* is the question to answer. Explicitly including a mode property on the object elevates no unexpected privileges. Having said that, the ```add_chunk``` method makes appending, when permissions allow, an expected ability of said object though.

For what it is worth all tests succeeded during ```make test``` on a read-only filesystem.
```
$ make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/*/*.t
t/mojo/asset.t ............................. ok

All tests successful.
Files=85, Tests=9939, 52 wallclock secs ( 1.57 usr 0.23 sys + 31.76 cusr 3.09 csys = 36.65 CPU)
Result: PASS
$ ls
CONTRIBUTING.md Changes LICENSE MANIFEST.SKIP MYMETA.json MYMETA.yml Makefile Makefile.PL README.md blib examples lib pm_to_blib script t
$ touch test.ro
touch: cannot touch `test.ro': Read-only file system
```