<?xml version='1.0' encoding='utf-8' ?>

<rss version='2.0' xmlns:lj='http://www.livejournal.org/rss/lj/1.0/' xmlns:atom10='http://www.w3.org/2005/Atom'>
<channel>
  <title>Dreamwidth Development</title>
  <link>https://dw-dev.dreamwidth.org/</link>
  <description>Dreamwidth Development - Dreamwidth Studios</description>
  <lastBuildDate>Fri, 11 Jan 2013 08:51:04 GMT</lastBuildDate>
  <generator>LiveJournal / Dreamwidth Studios</generator>
  <lj:journal>dw_dev</lj:journal>
  <lj:journaltype>community</lj:journaltype>
  <image>
    <url>https://v2.dreamwidth.org/482697/10</url>
    <title>Dreamwidth Development</title>
    <link>https://dw-dev.dreamwidth.org/</link>
    <width>100</width>
    <height>38</height>
  </image>

<item>
  <guid isPermaLink='true'>https://dw-dev.dreamwidth.org/130395.html</guid>
  <pubDate>Fri, 11 Jan 2013 08:51:04 GMT</pubDate>
  <title>Renaming Apache2::Request $r</title>
  <link>https://dw-dev.dreamwidth.org/130395.html</link>
  <description>Posted by: &lt;span lj:user=&apos;fu&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://fu.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://fu.dreamwidth.org/&apos;&gt;&lt;b&gt;fu&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I keep tripping over $r which is from DW::Request-&amp;gt;get, and is a DW::Request object $r which is an actual Apache2::RequestRec object -- the two are used in similar contexts and often have similarly named methods, but then you&apos;ll run into a method which behaves a a bit differently from one to the other and spend two hours debugging a completely unrelated thing.&lt;br /&gt;&lt;br /&gt;We&apos;re trying to move away from Apache2::RequestRec objects and converting them into DW::Request where needed. How about we rename the old $r to $apache_r, and keep the new $r the same, so it&apos;s obvious at a glance which is which?&lt;br /&gt;&lt;br /&gt;ETA: I&apos;ve gone ahead and done just that for &lt;a href=&quot;https://github.com/dreamwidth/dw-free/pull/211&quot;&gt;https://github.com/dreamwidth/dw-free/pull/211&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev&amp;ditemid=130395&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev.dreamwidth.org/130395.html</comments>
  <category>apache2</category>
  <lj:security>public</lj:security>
  <lj:poster>fu</lj:poster>
  <lj:reply-count>3</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev.dreamwidth.org/98513.html</guid>
  <pubDate>Sat, 01 Oct 2011 14:01:10 GMT</pubDate>
  <title>Apache::LiveJournal::db_logger(), LJ::AccessLogRecord, LJ::AccessLogSink, and LJ::AccessLogSink::*</title>
  <link>https://dw-dev.dreamwidth.org/98513.html</link>
  <description>Posted by: &lt;span lj:user=&apos;pauamma&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://pauamma.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user.png&apos; alt=&apos;[personal profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://pauamma.dreamwidth.org/&apos;&gt;&lt;b&gt;pauamma&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Apache::LiveJournal::db_logger() was disabled early on as part of the Apache2 conversion. The intent was apparently to revisit that later, but it&apos;s been over 3 years and there&apos;s no &quot;later&quot; yet. As far as I can tell, Apache::LiveJournal::db_logger() is the only bit that uses LJ::AccessLogRecord, LJ::AccessLogSink, and LJ::AccessLogSink::* (there are other references, but they&apos;re in stuff like confcheck, so they don;t count).&lt;br /&gt;&lt;br /&gt;Get rid of those? Or is there a planned use or another reason to keep them in the codebase?&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev&amp;ditemid=98513&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev.dreamwidth.org/98513.html</comments>
  <category>apache2</category>
  <category>other dw sites</category>
  <lj:security>public</lj:security>
  <lj:poster>pauamma</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
<item>
  <guid isPermaLink='true'>https://dw-dev.dreamwidth.org/630.html</guid>
  <pubDate>Tue, 03 Jun 2008 22:52:17 GMT</pubDate>
  <title>Converting to Apache 2</title>
  <link>https://dw-dev.dreamwidth.org/630.html</link>
  <description>Posted by: &lt;span lj:user=&apos;mark&apos; style=&apos;white-space: nowrap;&apos; class=&apos;ljuser&apos;&gt;&lt;a href=&apos;https://mark.dreamwidth.org/profile&apos;&gt;&lt;img src=&apos;https://www.dreamwidth.org/img/silk/identity/user_staff.png&apos; alt=&apos;[staff profile] &apos; width=&apos;17&apos; height=&apos;17&apos; style=&apos;vertical-align: text-bottom; border: 0; padding-right: 1px;&apos; /&gt;&lt;/a&gt;&lt;a href=&apos;https://mark.dreamwidth.org/&apos;&gt;&lt;b&gt;mark&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Here&apos;s a quick and dirty guide to things you will need to watch for when touching files and how to help us convert everything to Apache 2 / mod_perl 2 compatibility.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1) The Request Object&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Never call Apache-&amp;gt;request.&amp;nbsp; If you need the request object, use BML::get_request() which will do the Right Thing to return the appropriate request object for you to mess with.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2) $ENV{LJHOME} is Dead&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You should use $LJ::HOME instead.&amp;nbsp; (Caveat: if you&apos;re writing a command line tool, you may need to use the environment variable, depending on what libraries you load... but for web context, always use $LJ::HOME!)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3) Methods become Hashes&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In a move that I don&apos;t particularly understand, now we must pluralize some things and treat most things like a hash.&amp;nbsp; If you are used to this:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; $r-&amp;gt;header_in(&quot;Host&quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp; $r-&amp;gt;header_in(&quot;Host&quot; =&amp;gt; &quot;bar&quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; $r-&amp;gt;notes(&quot;Something&quot;)&lt;br /&gt;&lt;br /&gt;Then you should now get used to this:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; $r-&amp;gt;headers_in-&amp;gt;{Host};&lt;br /&gt;&amp;nbsp;&amp;nbsp; $r-&amp;gt;headers_in-&amp;gt;{Host} = &quot;bar&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp; $r-&amp;gt;notes-&amp;gt;{Something}&lt;br /&gt;&lt;br /&gt;Not much of a change.&amp;nbsp; This goes for all of the header calls: headers_in, headers_out, err_headers_in, err_headers_out, etc as well as notes and pnotes.&amp;nbsp; There are probably other changes I&apos;ve missed that do this too.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4) $r-&amp;gt;send_http_header defunct?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I&apos;ve yet to figure out a replacement for this function.&amp;nbsp; It seems to not be required anymore?&amp;nbsp; The modules seem to do the right thing, at least in all of the cases I&apos;ve tried, without ever calling this.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5) ...?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I&apos;m sure I&apos;m missing something.&amp;nbsp; But at this point, if you want to start grepping through dw-free for header_in, send_http_header, notes, etc and then start fixing it, go for it!&amp;nbsp; It&apos;s appreciated, as there are still many files that have these.&lt;br /&gt;&lt;br /&gt;As a second/other thought, I&apos;ve been debating creating an LJ::Request object that we can use instead of Apache2::RequestRec (or whatever it is).&amp;nbsp; That way, if we ever need to change the way something works (i.e. upgrade to Apache 2.2 / mod_perl 2.2?) then we can change that one module.&lt;br /&gt;&lt;br /&gt;Opinions and discussion are welcome, of course!&lt;br /&gt;&lt;br /&gt;&lt;img src=&quot;https://www.dreamwidth.org/tools/commentcount?user=dw_dev&amp;ditemid=630&quot; width=&quot;30&quot; height=&quot;12&quot; alt=&quot;comment count unavailable&quot; style=&quot;vertical-align: middle;&quot;/&gt; comments</description>
  <comments>https://dw-dev.dreamwidth.org/630.html</comments>
  <category>coding</category>
  <category>apache2</category>
  <lj:security>public</lj:security>
  <lj:poster>mark</lj:poster>
  <lj:reply-count>0</lj:reply-count>
</item>
</channel>
</rss>
