<div dir="ltr"><div>META: my reply including the list but was bounced because my default email address was not the one I subscribed with.</div><div><br></div><div><br></div>I&#39;d suggest these files are the Model part of MVC and you should have a Class that you use to interact with files. This Class is independent of you Catalyst App and should be able to run in it&#39;s own right. Page 135 of the book discussing Database model because that&#39;s the common model but there are model class for working with files[1]. There are several references in the book to testing. Testing, along with software versioning are part of the tool-set you&#39;ll want to become familiar with if your going to be writing software. You could take a look at the advent calendar articles [2], they are not that up-to-date but useful none the less I&#39;d say.<div><br></div><div>Using a database would adios your permissions problems too. If you just want to sort out permissions problems, you could have the files/directories owned by the same user that runs you web server or do something fancy with suexec. <br><div><br></div><div>I want to caution you, in the nicest possible way. Writing software requires a number of skills and a lot of research and learning. You can&#39;t avoid the latter. What may seem like a lot of unnecessary aggravation (testing and version control) have come about because it&#39;s no fun fixing problems after the event.</div><div><br></div><div>You could also look at Dancer2 [3] as that be good fit too.</div><div>Good luck,</div><div>Dermot.</div><div><br></div><div><br>1) <a href="https://metacpan.org/pod/Catalyst::Model::File">https://metacpan.org/pod/Catalyst::Model::File</a></div><div>2) <a href="http://www.catalystframework.org/calendar/">http://www.catalystframework.org/calendar/</a></div></div><div>3) <a href="https://metacpan.org/pod/distribution/Dancer2/script/dancer2">https://metacpan.org/pod/distribution/Dancer2/script/dancer2</a></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 9 March 2016 at 13:26, Andrew <span dir="ltr">&lt;<a href="mailto:catalystgroup@unitedgames.co.uk" target="_blank">catalystgroup@unitedgames.co.uk</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>





<div bgcolor="#ffffff">
<div><font size="2"></font> </div>
<blockquote dir="ltr" style="PADDING-RIGHT:0px;PADDING-LEFT:5px;MARGIN-LEFT:5px;BORDER-LEFT:#000000 2px solid;MARGIN-RIGHT:0px">
  <div style="FONT:10pt arial"> </div>
  <div dir="ltr">
  <div class="gmail_extra">
  <div class="gmail_quote"><span class="">
  <div><font size="2"></font><font size="2"></font><font size="2"></font><br></div>
  <div>It sounds to me like you should treat these text files as the data model 
  </div>
  <div><font size="2"></font> </div>
  </span><div><font size="2">---&gt; Are you suggesting I do something to them, or 
  is this just a linguistic point about what to call or refer to the data 
  as?</font></div>
  <div><font size="2">
  <div><font size="2">I&#39;m new to Catalyst and </font><font size="2">previously 
  coded in procedural perl, where I </font><font size="2">always used a policy of: 
  data - processing - layout.</font></div>
  <div><font size="2">I equate that to Catalyst&#39;s Model - Controller - View. 
  </font><font size="2">However, my data was always text files, my processing was 
  cgi scripts, and my layout was always html templates.</font></div>
  <div><font size="2">I now code with my processing as subroutines within *.pm 
  files within Catalyst&#39;s Controller folder,</font></div>
  <div><font size="2">however I haven&#39;t touched the View or Model folders - am 
  still reading in html templates, substituting values, and spitting them out as 
  the response to the browser - all within my controllers - it&#39;s processing 
  after all.</font></div>
  <div><font size="2"></font> </div>
  <div><font size="2">In short, I&#39;m happy to call my text files the data model, 
  where before I would have called them the data.</font></div>
  <div><font size="2">However - are you suggesting I do 
  anything?</font></div></font></div><span class="">
  <div><font size="2"></font> </div>
  <div>and yes, do not check it in to your repo.</div>
  <div><font size="2"></font> </div>
  </span><div><font size="2">---&gt; I have no idea what repo is. Do you mean repository, 
  for a versioning system? Atm, my versioning system is to download the lib 
  folder from the dev server using Cyberduck, and put it in a folder on my 
  computer hard drive - the folder having a version number. Then I can 
  upload whatever version I want to the production server - normally the lib 
  from the latest version folder created. </font></div><span class="">
  <div><font size="2"></font> </div>
  <div> Rather create a model class to access it</div>
  </span><div><font size="2">---&gt; I will have to research how to do this. My resources 
  include google search, and the Definitive Guide to Catalyst 
  book.</font></div><span class="">
  <div><font size="2"></font> </div>
  <div> and configure the path in you config file.</div>
  </span><div><font size="2">---&gt; At present, I am reading the path in from a separate 
  text file.</font></div><span class="">
  <div><font size="2"></font> </div>
  <div> When it comes to testing you are going to have to create a sample 
  of those text files under the t/ directory.</div>
  <div><font size="2"></font> </div>
  </span><div><font size="2">---&gt; Still learning Catalyst and haven&#39;t touched testing. 
  I generally don&#39;t get it. Either a web app works, or is broken. I don&#39;t get 
  writing code to test if code works. Comes across as some sort of coding 
  narcissism.</font></div><span class="">
  <div><font size="2"></font><font size="2"></font> </div>
  <div>Having said that, you should probably find a way to use a database. It 
  sounds to me like your data would fit nicely into a database and your 
  permissions problems to be less significant.</div>
  <div><font size="2"></font> </div>
  </span><div><font size="2">---&gt; Yes, I&#39;ve painless experience of connecting to a 
  MySQL database. I just hoped I could use Catalyst whilst working in the same 
  simple way I worked before, where turn around was very fast. I just have one 
  small task to accomplish, and some files seemed the easiest quickest way to do 
  it, and I&#39;ve hit all these permission problems, and I just thought it must be 
  such a common problem, someone is bound to have solved it - so I thought to 
  ask the group.</font></div>
  <div><font size="2"></font> </div>
  <div><font size="2">---&gt; Right now my solution is super simple - just use 
  spew, and avoid using append.</font></div>
  <div><font size="2"></font> </div>
  <div><font size="2">---&gt; If there&#39;s any advice or tutorials on how to sort 
  out permissions, or how to use text files as your model in Catalyst, I&#39;d 
  appreciate it. </font></div>
  <div><font size="2"></font> </div>
  <div>Hope that helps,</div>
  <div><font size="2"></font> </div>
  <div><font size="2">---&gt; It was insightful, and has given me something to 
  research. Right now I don&#39;t understand enough about how Catalyst works to know 
  what creating a model class involves, and if it will solve the permissions 
  problem, or if it was just mentioned as a way of putting the data folder&#39;s 
  path into the config file. I shall look into it, and hopefully won&#39;t be 
  ignorant for too much longer.</font></div>
  <div><font size="2"></font> </div>
  <div><font size="2">---&gt; And thanks for getting back to me! =D</font></div>
  <div><font size="2"></font> </div>
  <div><font size="2">---&gt; Yours,</font></div>
  <div><font size="2">---&gt; Andrew.</font></div>
  <div><font size="2"></font> </div>
  <div>Dermot.</div>
  <div><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><br></div>
  <div><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><br></div>
  <div><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><br></div>
  <div><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><font size="2"></font><br></div>
  <div><font size="2"></font> </div></div></div></div></blockquote></div>
</blockquote></div><br></div>