<div dir="ltr">Hi Daniel,<div><br></div><div>One comment I would make is that I think you should pick one word order and stick with it for everything.  Your module on github is named CheckVersion; the perl code inside of it is named VersionCheck.pm; the subroutine is named &quot;check_version&quot;; the environment variable is named &quot;DBIC_SKIP_VERSION_CHECK&quot;.</div><div><br></div><div>It&#39;s weird to me to have a subroutine named with a leading underscore that is designed to be overridden (I&#39;m new to the guts of DBIC components, so if that&#39;s normal, ignore my ignorant input).</div><div><br></div><div>The naming of those subroutines &quot;database_too_new&quot; and &quot;database_too_old&quot; make them sound like booleans--as if you would be able to do this:</div><div><br></div><div>if ($schema-&gt;database_too_new) {</div><div># deal with that</div><div>}</div><div>elsif ( $schema-&gt;database_too_old ) {</div><div># deal with that</div><div>}</div><div><br></div><div>Maybe they should be named &quot;handle_database_too_old&quot; and &quot;handle_database_too_new&quot;.  I would also suggest that you actually implement database_too_new and database_too_old and make those available to the user as well.</div><div><br></div><div>For example, a user may want to check if the database is too old, and, if so, attempt to apply an update script, and then check again, or something like that, rather than only having the ability to specify a particular subroutine to run in the database-too-old situation.</div><div><br></div><div>I very much like your idea of having (what appears to me to be) a clean wrapper that can be called by the user in one function.  Having said that, I&#39;m a relative newcomer to DBIC and I&#39;ve never used DeploymentHandler, so my input is certainly less informed than it could be.</div><div><br></div><div>mike</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 6, 2017 at 6:58 AM, Daniel Böhmer <span dir="ltr">&lt;<a href="mailto:post@daniel-boehmer.de" target="_blank">post@daniel-boehmer.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello DBIC devs and users, escpecially fREW,<br>
<br>
I poured some work of mine into a dedicated Perl distribution and think about<br>
uploading it to CPAN. My hope is to get some feedback from you.<br>
<br>
Currently you can find the code only on Github:<br>
<a href="https://github.com/dboehmer/DBIx-Class-Schema-CheckVersion" rel="noreferrer" target="_blank">https://github.com/dboehmer/DB<wbr>Ix-Class-Schema-CheckVersion</a><br>
<br>
Before uploading it to CPAN in the first place I&#39;d like to know:<br>
<br>
- Are there any existing modules doing the same job?<br>
<br>
- Before occupying the namespace: Do have any thoughts on the name?<br>
<br>
Even after uploading I am interested in:<br>
<br>
- bug reports<br>
<br>
- feature requests<br>
<br>
- patches in form of Github Pull Requests<br>
<br>
- ideas how to enable automatic calling of check_version() during connect()<br>
but still allowing deploying and therefor connecting to any empty DB w/o check<br>
<br>
Here&#39;s the story of what the module is about:<br>
<br>
I am adopting DBIC::DeploymentHandler in a project I&#39;m currently working for.<br>
We agreed on having having a check on server startup to see if the database<br>
has the same version as our schema. It wasn&#39;t trivial for me to find out how<br>
to do that but the result are a few pretty generic lines. You can inherit<br>
the module from your schema class and call check_version()<br>
<br>
I am looking forward to your feedback and releasing the module.<br>
<br>
Kind regards<br>
Daniel Böhmer aka DBOEHMER<br>
<br>
______________________________<wbr>_________________<br>
List: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class" rel="noreferrer" target="_blank">http://lists.scsys.co.uk/cgi-b<wbr>in/mailman/listinfo/dbix-class</a><br>
IRC: <a href="http://irc.perl.org#dbix-class" rel="noreferrer" target="_blank">irc.perl.org#dbix-class</a><br>
SVN: <a href="http://dev.catalyst.perl.org/repos/bast/DBIx-Class/" rel="noreferrer" target="_blank">http://dev.catalyst.perl.org/r<wbr>epos/bast/DBIx-Class/</a><br>
Searchable Archive: <a href="http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk" rel="noreferrer" target="_blank">http://www.grokbase.com/group/<wbr>dbix-class@lists.scsys.co.uk</a></blockquote></div><br></div>