<p>Well I'm using it to work with joins in dbix-class, looks like this:</p>
<pre><code>use DBIx::Class::Helper::XJoin;
my $rs = $schema->resultset('Project');
xjoin($rs,
"parent.tags as tag1",
"parent.tags as tag2",
"tags as tag3",
);
$rs->search([
xjoin_column_alias("parent.tag1.name") => "Open",
xjoin_column_alias("parent.tag2.name") => "Public",
xjoin_column_alias("tag3.name") => "Private",
]);
</code></pre>
<p>xjoin_column_alias returns object from Scalar::Defer, so it basically boils down to:</p>
<pre><code> use Scalar::Defer qw/defer/;
my $rs = $schema->resultset('Project');
$rs->search([
defer { "column" } => "value",
]);
</code></pre>
<p>Does it make any sense?</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/dbsrgits/dbix-class/pull/98#issuecomment-203396099">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/AASeApx6ZoIMGLA407EZJ8imdx-p8GrOks5pymTNgaJpZM4H7fjh.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/dbsrgits/dbix-class/pull/98#issuecomment-203396099"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>