<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments for The Curious Technoid	</title>
	<atom:link href="https://thecurioustechnoid.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>https://thecurioustechnoid.com/</link>
	<description>technology made simple</description>
	<lastBuildDate>Thu, 06 Jun 2024 14:07:18 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>
		Comment on Mojolicious (Part 4): Database Management by Rakshith Chengappa Mullengada		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-1205</link>

		<dc:creator><![CDATA[Rakshith Chengappa Mullengada]]></dc:creator>
		<pubDate>Thu, 06 Jun 2024 14:07:18 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=459#comment-1205</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-1198&quot;&gt;Hylke&lt;/a&gt;.

I am glad it did. Happy Coding !]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-1198">Hylke</a>.</p>
<p>I am glad it did. Happy Coding !</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 4): Database Management by Hylke		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-1198</link>

		<dc:creator><![CDATA[Hylke]]></dc:creator>
		<pubDate>Mon, 03 Jun 2024 20:44:00 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=459#comment-1198</guid>

					<description><![CDATA[Thanks a lot, I was having issues accessing my database helper through the model and this fixed it :) Very grateful for the article.]]></description>
			<content:encoded><![CDATA[<p>Thanks a lot, I was having issues accessing my database helper through the model and this fixed it 🙂 Very grateful for the article.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 4): Database Management by Rakshith Chengappa Mullengada		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-853</link>

		<dc:creator><![CDATA[Rakshith Chengappa Mullengada]]></dc:creator>
		<pubDate>Fri, 11 Aug 2023 07:59:08 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=459#comment-853</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-850&quot;&gt;Steve&lt;/a&gt;.

You can put it in GitHub repository and share the link with me. Dropbox will also work.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-850">Steve</a>.</p>
<p>You can put it in GitHub repository and share the link with me. Dropbox will also work.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 4): Database Management by Steve		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-850</link>

		<dc:creator><![CDATA[Steve]]></dc:creator>
		<pubDate>Thu, 10 Aug 2023 18:08:01 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=459#comment-850</guid>

					<description><![CDATA[How would I send you all of the code?

Can I include it as an attachment somehow? Share it via dropbox or something?

Thanks.]]></description>
			<content:encoded><![CDATA[<p>How would I send you all of the code?</p>
<p>Can I include it as an attachment somehow? Share it via dropbox or something?</p>
<p>Thanks.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 4): Database Management by Rakshith Chengappa Mullengada		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-849</link>

		<dc:creator><![CDATA[Rakshith Chengappa Mullengada]]></dc:creator>
		<pubDate>Thu, 10 Aug 2023 08:58:41 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=459#comment-849</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-835&quot;&gt;Steve&lt;/a&gt;.

Hi Steve,

Apologies for the delay. 

It would help if you had kept the code in a notepad or something. Nevertheless I used the exact same code that you have pasted and tried with v9.33 and it seems to be working fine. Please find the screenshot below:

&lt;img src=&quot;https://thecurioustechnoid.com/wp-content/uploads/2023/08/Screen-Shot-2023-08-10-at-12.57.19.png&quot; alt=&quot;Screenshot&quot; /&gt;

Can you give the entire source code so that I can try that ?

Thanks,
RC]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-835">Steve</a>.</p>
<p>Hi Steve,</p>
<p>Apologies for the delay. </p>
<p>It would help if you had kept the code in a notepad or something. Nevertheless I used the exact same code that you have pasted and tried with v9.33 and it seems to be working fine. Please find the screenshot below:</p>
<p><img src="https://thecurioustechnoid.com/wp-content/uploads/2023/08/Screen-Shot-2023-08-10-at-12.57.19.png" alt="Screenshot" /></p>
<p>Can you give the entire source code so that I can try that ?</p>
<p>Thanks,<br />
RC</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 4): Database Management by Steve		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-835</link>

		<dc:creator><![CDATA[Steve]]></dc:creator>
		<pubDate>Sat, 05 Aug 2023 02:58:30 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=459#comment-835</guid>

					<description><![CDATA[Sorry, the I/O watcher error is also there. Here&#039;s a more complete capture:

[2023-08-04 22:51:45.24467] [3372701] [trace] [quBKk0KzFuuL] POST &quot;/login&quot;
[2023-08-04 22:51:45.24542] [3372701] [trace] [quBKk0KzFuuL] Routing to controller &quot;myWebSite::Controller::CustomController&quot; and action &quot;validUserCheck&quot;
[2023-08-04 22:51:45.24637] [3372701] [trace] [quBKk0KzFuuL] Rendering template &quot;myTemplates/homepage.html.ep&quot;
[2023-08-04 22:51:45.24813] [3372701] [trace] [quBKk0KzFuuL] Rendering cached template &quot;layouts/master.html.ep&quot;
[2023-08-04 22:51:45.24895] [3372701] [trace] [quBKk0KzFuuL] 200 OK (0.00429s, 233.100/s)
[2023-08-04 22:51:45.24986] [3372701] [error] [quBKk0KzFuuL] Can&#039;t use an undefined value as an ARRAY reference at /usr/local/share/perl5/5.32/Mojolicious/Controller.pm line 231.

[2023-08-04 22:51:45.25005] [3372701] [trace] [quBKk0KzFuuL] Template &quot;exception.development.html.ep&quot; not found
[2023-08-04 22:51:45.25018] [3372701] [trace] [quBKk0KzFuuL] Template &quot;exception.html.ep&quot; not found
[2023-08-04 22:51:45.25027] [3372701] [trace] [quBKk0KzFuuL] Rendering cached template &quot;mojo/debug.html.ep&quot;
Mojo::Reactor::Poll: I/O watcher failed: A response has already been rendered at /usr/local/share/perl5/5.32/Mojolicious/Controller.pm line 154.



mojo version
CORE
  Perl        (v5.32.1, linux)
  Mojolicious (9.33, Waffle)


Here&#039;s the code in my CustomController.pm. Do you need to see anything else?

package myWebSite::Controller::CustomController;
use Mojo::Base &#039;Mojolicious::Controller&#039;, -signatures;

# This action will render a template
sub welcome ($self) {

  # Render template &quot;example/welcome.html.ep&quot; with message
#   $self-&#062;render(msg =&#062; &#039;Welcome to the Mojolicious real-time web framework!&#039;);
  $self-&#062;render(template =&#062; &#039;myTemplates/homepage&#039;,
  				msg =&#062; &#039;Welcome to my personal web site.&#039;);
}


# Display the login page
sub displayLogin {

	my $self = shift;
	
#	if(alreadyLoggedIn($self))
	# see comments in https://thecurioustechnoid.com/mojolicious-part-3-session-management/
	# evidently, you can no longer render 2 things in one route. alreadyLoggedIn renders myTemplates/login
	# if someone is not logged in, then this code also renders myTemplates/login if someone is not logged in.
	# if we just check for the session here, we avoid the second render.
	if($self-&#062;session(&#039;is_auth&#039;))
		{
		# user already logged in. Senf the to the welcome page
		welcome($self);
		}
	else
		{
		# user not logged in. Send them to login page
		$self-&#062;render(template=&#062; &quot;myTemplates/login&quot;, error_message=&#062; &quot;&quot;);
		}
}


sub validUserCheck {

	my $self = shift;
	
	# test/demo data
	my %validUsers = (&quot;JANE&quot; =&#062; &quot;welcome123&quot;
						,&quot;JILL&quot; =&#062; &quot;welcome234&quot;
						,&quot;TOM&quot; =&#062; &quot;welcome345&quot;
						,&quot;RAJ&quot; =&#062; &quot;test123&quot;
						,&quot;RAM&quot; =&#062; &quot;digitalocean123&quot;	
					);

	my $user = uc($self-&#062;param(&#039;username&#039;));
	my $password = $self-&#062;param(&#039;pass&#039;);
	
	if(exists($validUsers{$user}))
		{
		if($validUsers{$user} eq $password)
			{
			# create a session cookie
			$self-&#062;session(is_auth =&#062; 1);
			# store the username in the cookie
			$self-&#062;session(username =&#062; $user);
			# cookie expires in 10 minutes if no activity (how is this detected?)
			$self-&#062;session(expiration =&#062; 600);
			
			# direct the user to the home page
			welcome($self);
			}
		else
			{
			# wrong password
			$self-&#062;render(template=&#062; &quot;myTemplates/login&quot;, error_message=&#062; &quot;Invalid password. Try again.&quot;);
			}
		}
	else
		{
		# user not found
		$self-&#062;render(template=&#062; &quot;myTemplates/login&quot;, error_message=&#062; &quot;User $user not found in this system.&quot;);
		}
}


# check if user is already logged in
sub alreadyLoggedIn {

	my $self = shift;
	
	return 1 if $self-&#062;session(&#039;is_auth&#039;);

	# user not logged in. Send them to login page
	$self-&#062;render(template=&#062; &quot;myTemplates/login&quot;, error_message=&#062; &quot;You must log in to use this web site&quot;);

	return 0;
}


# log out
sub logout {

	my $self = shift;

	# end the session by expiring the cookie in 1 second?
	$self-&#062;session(expires =&#062; 1);
	$self-&#062;render(template=&#062; &quot;myTemplates/logout&quot;);

}



sub loadTestimonials{

    my $self = shift;
    my $all_testimonials_html;

    foreach my $all_testimonials (@{$self-&#062;dbhandle-&#062;fetch_all_testimonials})
    {
        $all_testimonials_html .= &quot;
  
      
          &quot;.$all_testimonials-&#062;{testimonial}.&quot;
          &lt;i&gt;&quot;.$all_testimonials-&#062;{published_by}.&quot;&quot;.$all_testimonials-&#062;{published_on}.&quot;&lt;/i&gt;
     
  &quot;;
    }
    $self-&#062;render(template =&#062; &#039;myTemplates/managetestimonials&#039;,msg =&#062; &#039;View Testimonials&#039;,alltestimonials =&#062; $all_testimonials_html);


}


sub saveTestimonial{

    my $self = shift;
    my $new_testimonial = $self-&#062;param(&#039;userReview&#039;);
    my $user = $self-&#062;session(&#039;username&#039;);

    $self-&#062;dbhandle-&#062;publish_testimonial($new_testimonial,$user);
    &#038;loadTestimonials($self);
}


1;]]></description>
			<content:encoded><![CDATA[<p>Sorry, the I/O watcher error is also there. Here&#8217;s a more complete capture:</p>
<p>[2023-08-04 22:51:45.24467] [3372701] [trace] [quBKk0KzFuuL] POST &#8220;/login&#8221;<br />
[2023-08-04 22:51:45.24542] [3372701] [trace] [quBKk0KzFuuL] Routing to controller &#8220;myWebSite::Controller::CustomController&#8221; and action &#8220;validUserCheck&#8221;<br />
[2023-08-04 22:51:45.24637] [3372701] [trace] [quBKk0KzFuuL] Rendering template &#8220;myTemplates/homepage.html.ep&#8221;<br />
[2023-08-04 22:51:45.24813] [3372701] [trace] [quBKk0KzFuuL] Rendering cached template &#8220;layouts/master.html.ep&#8221;<br />
[2023-08-04 22:51:45.24895] [3372701] [trace] [quBKk0KzFuuL] 200 OK (0.00429s, 233.100/s)<br />
[2023-08-04 22:51:45.24986] [3372701] [error] [quBKk0KzFuuL] Can&#8217;t use an undefined value as an ARRAY reference at /usr/local/share/perl5/5.32/Mojolicious/Controller.pm line 231.</p>
<p>[2023-08-04 22:51:45.25005] [3372701] [trace] [quBKk0KzFuuL] Template &#8220;exception.development.html.ep&#8221; not found<br />
[2023-08-04 22:51:45.25018] [3372701] [trace] [quBKk0KzFuuL] Template &#8220;exception.html.ep&#8221; not found<br />
[2023-08-04 22:51:45.25027] [3372701] [trace] [quBKk0KzFuuL] Rendering cached template &#8220;mojo/debug.html.ep&#8221;<br />
Mojo::Reactor::Poll: I/O watcher failed: A response has already been rendered at /usr/local/share/perl5/5.32/Mojolicious/Controller.pm line 154.</p>
<p>mojo version<br />
CORE<br />
  Perl        (v5.32.1, linux)<br />
  Mojolicious (9.33, Waffle)</p>
<p>Here&#8217;s the code in my CustomController.pm. Do you need to see anything else?</p>
<p>package myWebSite::Controller::CustomController;<br />
use Mojo::Base &#8216;Mojolicious::Controller&#8217;, -signatures;</p>
<p># This action will render a template<br />
sub welcome ($self) {</p>
<p>  # Render template &#8220;example/welcome.html.ep&#8221; with message<br />
#   $self-&gt;render(msg =&gt; &#8216;Welcome to the Mojolicious real-time web framework!&#8217;);<br />
  $self-&gt;render(template =&gt; &#8216;myTemplates/homepage&#8217;,<br />
  				msg =&gt; &#8216;Welcome to my personal web site.&#8217;);<br />
}</p>
<p># Display the login page<br />
sub displayLogin {</p>
<p>	my $self = shift;</p>
<p>#	if(alreadyLoggedIn($self))<br />
	# see comments in <a href="https://thecurioustechnoid.com/mojolicious-part-3-session-management/" rel="ugc">https://thecurioustechnoid.com/mojolicious-part-3-session-management/</a><br />
	# evidently, you can no longer render 2 things in one route. alreadyLoggedIn renders myTemplates/login<br />
	# if someone is not logged in, then this code also renders myTemplates/login if someone is not logged in.<br />
	# if we just check for the session here, we avoid the second render.<br />
	if($self-&gt;session(&#8216;is_auth&#8217;))<br />
		{<br />
		# user already logged in. Senf the to the welcome page<br />
		welcome($self);<br />
		}<br />
	else<br />
		{<br />
		# user not logged in. Send them to login page<br />
		$self-&gt;render(template=&gt; &#8220;myTemplates/login&#8221;, error_message=&gt; &#8220;&#8221;);<br />
		}<br />
}</p>
<p>sub validUserCheck {</p>
<p>	my $self = shift;</p>
<p>	# test/demo data<br />
	my %validUsers = (&#8220;JANE&#8221; =&gt; &#8220;welcome123&#8243;<br />
						,&#8221;JILL&#8221; =&gt; &#8220;welcome234&#8243;<br />
						,&#8221;TOM&#8221; =&gt; &#8220;welcome345&#8243;<br />
						,&#8221;RAJ&#8221; =&gt; &#8220;test123&#8243;<br />
						,&#8221;RAM&#8221; =&gt; &#8220;digitalocean123&#8221;<br />
					);</p>
<p>	my $user = uc($self-&gt;param(&#8216;username&#8217;));<br />
	my $password = $self-&gt;param(&#8216;pass&#8217;);</p>
<p>	if(exists($validUsers{$user}))<br />
		{<br />
		if($validUsers{$user} eq $password)<br />
			{<br />
			# create a session cookie<br />
			$self-&gt;session(is_auth =&gt; 1);<br />
			# store the username in the cookie<br />
			$self-&gt;session(username =&gt; $user);<br />
			# cookie expires in 10 minutes if no activity (how is this detected?)<br />
			$self-&gt;session(expiration =&gt; 600);</p>
<p>			# direct the user to the home page<br />
			welcome($self);<br />
			}<br />
		else<br />
			{<br />
			# wrong password<br />
			$self-&gt;render(template=&gt; &#8220;myTemplates/login&#8221;, error_message=&gt; &#8220;Invalid password. Try again.&#8221;);<br />
			}<br />
		}<br />
	else<br />
		{<br />
		# user not found<br />
		$self-&gt;render(template=&gt; &#8220;myTemplates/login&#8221;, error_message=&gt; &#8220;User $user not found in this system.&#8221;);<br />
		}<br />
}</p>
<p># check if user is already logged in<br />
sub alreadyLoggedIn {</p>
<p>	my $self = shift;</p>
<p>	return 1 if $self-&gt;session(&#8216;is_auth&#8217;);</p>
<p>	# user not logged in. Send them to login page<br />
	$self-&gt;render(template=&gt; &#8220;myTemplates/login&#8221;, error_message=&gt; &#8220;You must log in to use this web site&#8221;);</p>
<p>	return 0;<br />
}</p>
<p># log out<br />
sub logout {</p>
<p>	my $self = shift;</p>
<p>	# end the session by expiring the cookie in 1 second?<br />
	$self-&gt;session(expires =&gt; 1);<br />
	$self-&gt;render(template=&gt; &#8220;myTemplates/logout&#8221;);</p>
<p>}</p>
<p>sub loadTestimonials{</p>
<p>    my $self = shift;<br />
    my $all_testimonials_html;</p>
<p>    foreach my $all_testimonials (@{$self-&gt;dbhandle-&gt;fetch_all_testimonials})<br />
    {<br />
        $all_testimonials_html .= &#8221;</p>
<p>          &#8220;.$all_testimonials-&gt;{testimonial}.&#8221;<br />
          <i>&#8220;.$all_testimonials-&gt;{published_by}.&#8221;&#8221;.$all_testimonials-&gt;{published_on}.&#8221;</i></p>
<p>  &#8220;;<br />
    }<br />
    $self-&gt;render(template =&gt; &#8216;myTemplates/managetestimonials&#8217;,msg =&gt; &#8216;View Testimonials&#8217;,alltestimonials =&gt; $all_testimonials_html);</p>
<p>}</p>
<p>sub saveTestimonial{</p>
<p>    my $self = shift;<br />
    my $new_testimonial = $self-&gt;param(&#8216;userReview&#8217;);<br />
    my $user = $self-&gt;session(&#8216;username&#8217;);</p>
<p>    $self-&gt;dbhandle-&gt;publish_testimonial($new_testimonial,$user);<br />
    &amp;loadTestimonials($self);<br />
}</p>
<p>1;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 4): Database Management by Rakshith Chengappa Mullengada		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-834</link>

		<dc:creator><![CDATA[Rakshith Chengappa Mullengada]]></dc:creator>
		<pubDate>Fri, 04 Aug 2023 05:31:14 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=459#comment-834</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-833&quot;&gt;Steve&lt;/a&gt;.

But now the I/O watcher error seems to have disappeared. Are you using Mojolicious v9.22 or higher version ? 

Share your code please, I will have a look.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-833">Steve</a>.</p>
<p>But now the I/O watcher error seems to have disappeared. Are you using Mojolicious v9.22 or higher version ? </p>
<p>Share your code please, I will have a look.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 4): Database Management by Steve		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-833</link>

		<dc:creator><![CDATA[Steve]]></dc:creator>
		<pubDate>Thu, 03 Aug 2023 22:14:38 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=459#comment-833</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-832&quot;&gt;Steve&lt;/a&gt;.

So, when I successfully log in, I see this from morbo:

[2023-08-03 17:50:32.45835] [3241784] [trace] [eR8itINlVUpS] POST &quot;/login&quot;
[2023-08-03 17:50:32.45887] [3241784] [trace] [eR8itINlVUpS] Routing to controller &quot;myWebSite::Controller::CustomController&quot; and action &quot;validUserCheck&quot;
[2023-08-03 17:50:32.45972] [3241784] [trace] [eR8itINlVUpS] Rendering cached template &quot;myTemplates/homepage.html.ep&quot;
[2023-08-03 17:50:32.46007] [3241784] [trace] [eR8itINlVUpS] Rendering cached template &quot;layouts/master.html.ep&quot;
[2023-08-03 17:50:32.46183] [3241784] [trace] [eR8itINlVUpS] 200 OK (0.003493s, 286.287/s)
[2023-08-03 17:50:32.46265] [3241784] [error] [eR8itINlVUpS] Can&#039;t use an undefined value as an ARRAY reference at /usr/local/share/perl5/5.32/Mojolicious/Controller.pm line 231.

That line is inside a subroutine called signed_cookie. 

  my $sum = Digest::SHA::hmac_sha256_hex(&quot;$name=$value&quot;, $self-&#062;app-&#062;secrets-&#062;[0]);

So it looks like it was going to render homepage.html.ep then this error happened.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-832">Steve</a>.</p>
<p>So, when I successfully log in, I see this from morbo:</p>
<p>[2023-08-03 17:50:32.45835] [3241784] [trace] [eR8itINlVUpS] POST &#8220;/login&#8221;<br />
[2023-08-03 17:50:32.45887] [3241784] [trace] [eR8itINlVUpS] Routing to controller &#8220;myWebSite::Controller::CustomController&#8221; and action &#8220;validUserCheck&#8221;<br />
[2023-08-03 17:50:32.45972] [3241784] [trace] [eR8itINlVUpS] Rendering cached template &#8220;myTemplates/homepage.html.ep&#8221;<br />
[2023-08-03 17:50:32.46007] [3241784] [trace] [eR8itINlVUpS] Rendering cached template &#8220;layouts/master.html.ep&#8221;<br />
[2023-08-03 17:50:32.46183] [3241784] [trace] [eR8itINlVUpS] 200 OK (0.003493s, 286.287/s)<br />
[2023-08-03 17:50:32.46265] [3241784] [error] [eR8itINlVUpS] Can&#8217;t use an undefined value as an ARRAY reference at /usr/local/share/perl5/5.32/Mojolicious/Controller.pm line 231.</p>
<p>That line is inside a subroutine called signed_cookie. </p>
<p>  my $sum = Digest::SHA::hmac_sha256_hex(&#8220;$name=$value&#8221;, $self-&gt;app-&gt;secrets-&gt;[0]);</p>
<p>So it looks like it was going to render homepage.html.ep then this error happened.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 4): Database Management by Steve		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-832</link>

		<dc:creator><![CDATA[Steve]]></dc:creator>
		<pubDate>Thu, 03 Aug 2023 21:18:08 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=459#comment-832</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-830&quot;&gt;Rakshith Chengappa Mullengada&lt;/a&gt;.

Thanks. I had already made the change Peter suggested while I was doing part 3. This error started as was doing part 4.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-830">Rakshith Chengappa Mullengada</a>.</p>
<p>Thanks. I had already made the change Peter suggested while I was doing part 3. This error started as was doing part 4.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 4): Database Management by Rakshith Chengappa Mullengada		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-830</link>

		<dc:creator><![CDATA[Rakshith Chengappa Mullengada]]></dc:creator>
		<pubDate>Thu, 03 Aug 2023 16:48:00 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=459#comment-830</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-828&quot;&gt;Steve&lt;/a&gt;.

Hi Steve,

This looks like the same issue as I mentioned here:

https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-307

Mojolicious version issue. You might have to tweak the code a little to make it work with latest version or get the same version of Mojolicious that I used, v9.22 for this code to work.

Hope it helps !]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-828">Steve</a>.</p>
<p>Hi Steve,</p>
<p>This looks like the same issue as I mentioned here:</p>
<p><a href="https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-307" rel="ugc">https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-307</a></p>
<p>Mojolicious version issue. You might have to tweak the code a little to make it work with latest version or get the same version of Mojolicious that I used, v9.22 for this code to work.</p>
<p>Hope it helps !</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 4): Database Management by Rakshith Chengappa Mullengada		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-829</link>

		<dc:creator><![CDATA[Rakshith Chengappa Mullengada]]></dc:creator>
		<pubDate>Thu, 03 Aug 2023 16:43:20 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=459#comment-829</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-822&quot;&gt;Max&lt;/a&gt;.

Thank you for your kind words.

I moved to Django for a while and lately tinkering with VueJS + FastAPI. Been sometime since I used Mojolicious. I will try to see if I can create an article for this. If you are already working on it and are stuck somewhere, happy to weigh in.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-822">Max</a>.</p>
<p>Thank you for your kind words.</p>
<p>I moved to Django for a while and lately tinkering with VueJS + FastAPI. Been sometime since I used Mojolicious. I will try to see if I can create an article for this. If you are already working on it and are stuck somewhere, happy to weigh in.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 4): Database Management by Steve		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-828</link>

		<dc:creator><![CDATA[Steve]]></dc:creator>
		<pubDate>Thu, 03 Aug 2023 03:22:15 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=459#comment-828</guid>

					<description><![CDATA[Login no longer works for me. I see these errors from morbo:

[2023-08-02 23:16:22.26368] [3241784] [error] [gloA8P2znTQh] Can&#039;t use an undefined value as an ARRAY reference at /usr/local/share/perl5/5.32/Mojolicious/Controller.pm line 231.
[2023-08-02 23:16:22.26386] [3241784] [trace] [gloA8P2znTQh] Template &quot;exception.development.html.ep&quot; not found
[2023-08-02 23:16:22.26399] [3241784] [trace] [gloA8P2znTQh] Template &quot;exception.html.ep&quot; not found
[2023-08-02 23:16:22.26407] [3241784] [trace] [gloA8P2znTQh] Rendering cached template &quot;mojo/debug.html.ep&quot;
Mojo::Reactor::Poll: I/O watcher failed: A response has already been rendered at /usr/local/share/perl5/5.32/Mojolicious/Controller.pm line 154.

I didn&#039;t touch any of the login code.]]></description>
			<content:encoded><![CDATA[<p>Login no longer works for me. I see these errors from morbo:</p>
<p>[2023-08-02 23:16:22.26368] [3241784] [error] [gloA8P2znTQh] Can&#8217;t use an undefined value as an ARRAY reference at /usr/local/share/perl5/5.32/Mojolicious/Controller.pm line 231.<br />
[2023-08-02 23:16:22.26386] [3241784] [trace] [gloA8P2znTQh] Template &#8220;exception.development.html.ep&#8221; not found<br />
[2023-08-02 23:16:22.26399] [3241784] [trace] [gloA8P2znTQh] Template &#8220;exception.html.ep&#8221; not found<br />
[2023-08-02 23:16:22.26407] [3241784] [trace] [gloA8P2znTQh] Rendering cached template &#8220;mojo/debug.html.ep&#8221;<br />
Mojo::Reactor::Poll: I/O watcher failed: A response has already been rendered at /usr/local/share/perl5/5.32/Mojolicious/Controller.pm line 154.</p>
<p>I didn&#8217;t touch any of the login code.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 4): Database Management by Steve		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-827</link>

		<dc:creator><![CDATA[Steve]]></dc:creator>
		<pubDate>Thu, 03 Aug 2023 01:39:07 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=459#comment-827</guid>

					<description><![CDATA[You need to run the command

flush privileges;

as root before demo can log into mysql.]]></description>
			<content:encoded><![CDATA[<p>You need to run the command</p>
<p>flush privileges;</p>
<p>as root before demo can log into mysql.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 4): Database Management by Max		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-822</link>

		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Mon, 31 Jul 2023 06:52:05 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=459#comment-822</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-814&quot;&gt;Rakshith Chengappa Mullengada&lt;/a&gt;.

Hello, publications are stored in the database, but in the example you suggested, user accounts are stored in CustomController.pm

sub validUserCheck {

     my $self = shift;

     # List of registered users
     my %validUsers = ( &quot;JANE&quot; =&#062; &quot;welcome123&quot;
                       ,&quot;JILL&quot; =&#062; &quot;welcome234&quot;
                       ,&quot;TOM&quot; =&#062; &quot;welcome345&quot;
                       ,&quot;RAJ&quot; =&#062; &quot;test123&quot;
                       ,&quot;RAM&quot; =&#062; &quot;digitalocean123&quot;
                      );

it would be very interested to implement the registration page and have the credentials stored in the data base...

Actually, thank you very much for this article, it&#039;s the only good article besides the official documentation that I could find where I could get information about Mojolicious.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-814">Rakshith Chengappa Mullengada</a>.</p>
<p>Hello, publications are stored in the database, but in the example you suggested, user accounts are stored in CustomController.pm</p>
<p>sub validUserCheck {</p>
<p>     my $self = shift;</p>
<p>     # List of registered users<br />
     my %validUsers = ( &#8220;JANE&#8221; =&gt; &#8220;welcome123&#8243;<br />
                       ,&#8221;JILL&#8221; =&gt; &#8220;welcome234&#8243;<br />
                       ,&#8221;TOM&#8221; =&gt; &#8220;welcome345&#8243;<br />
                       ,&#8221;RAJ&#8221; =&gt; &#8220;test123&#8243;<br />
                       ,&#8221;RAM&#8221; =&gt; &#8220;digitalocean123&#8221;<br />
                      );</p>
<p>it would be very interested to implement the registration page and have the credentials stored in the data base&#8230;</p>
<p>Actually, thank you very much for this article, it&#8217;s the only good article besides the official documentation that I could find where I could get information about Mojolicious.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 4): Database Management by Rakshith Chengappa Mullengada		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-814</link>

		<dc:creator><![CDATA[Rakshith Chengappa Mullengada]]></dc:creator>
		<pubDate>Fri, 28 Jul 2023 12:16:05 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=459#comment-814</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-810&quot;&gt;Max&lt;/a&gt;.

The idea of these posts were to give you an idea as to how to work in Mojolicious. Are you stuck somewhere ? I can help if so.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-810">Max</a>.</p>
<p>The idea of these posts were to give you an idea as to how to work in Mojolicious. Are you stuck somewhere ? I can help if so.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 4): Database Management by Max		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-810</link>

		<dc:creator><![CDATA[Max]]></dc:creator>
		<pubDate>Thu, 27 Jul 2023 10:51:27 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=459#comment-810</guid>

					<description><![CDATA[cool. but why is way to make registration, why is not implemented?
it would be nice to see how its should work. =)]]></description>
			<content:encoded><![CDATA[<p>cool. but why is way to make registration, why is not implemented?<br />
it would be nice to see how its should work. =)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 3): Session Management by Rakshith Chengappa Mullengada		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-373</link>

		<dc:creator><![CDATA[Rakshith Chengappa Mullengada]]></dc:creator>
		<pubDate>Fri, 16 Sep 2022 04:31:15 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=431#comment-373</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-369&quot;&gt;Peter&lt;/a&gt;.

Hi Peter,

Thank you for taking the time to go through the article. I have changed the code so that others don&#039;t face the same issue. 

Happy Coding.

Cheers,
RC]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-369">Peter</a>.</p>
<p>Hi Peter,</p>
<p>Thank you for taking the time to go through the article. I have changed the code so that others don&#8217;t face the same issue. </p>
<p>Happy Coding.</p>
<p>Cheers,<br />
RC</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 3): Session Management by Peter		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-369</link>

		<dc:creator><![CDATA[Peter]]></dc:creator>
		<pubDate>Wed, 14 Sep 2022 18:41:07 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=431#comment-369</guid>

					<description><![CDATA[Using perl-5.36.0 (perlbrew) 
# mojo version:
Perl        (v5.36.0, freebsd)
Mojolicious (9.27, Waffle)

Had error: A response has already been rendered at /home/mojo/perl5/perlbrew/perls/perl-5.36.0/lib/site_perl/5.36.0/Mojolicious/Controller.pm line 154.
# trace] [xx5kwL28OTom] Rendering cached template &quot;mojo/debug.html.ep&quot;
Mojo::Reactor::Poll: I/O watcher failed: A response has already been rendered at /home/mojo/perl5/perlbrew/perls/perl-5.36.0/lib/site_perl/5.36.0/Mojolicious/Controller.pm line 154.

As the previous response changing this line make it works:
##   if(&#038;alreadyLoggedIn($self)){
    if($self-&#062;session(&#039;is_auth&#039;)){

Hope it save somebody frustration and enjoy your tutorial.
So far is fantastic, easy to understand.]]></description>
			<content:encoded><![CDATA[<p>Using perl-5.36.0 (perlbrew)<br />
# mojo version:<br />
Perl        (v5.36.0, freebsd)<br />
Mojolicious (9.27, Waffle)</p>
<p>Had error: A response has already been rendered at /home/mojo/perl5/perlbrew/perls/perl-5.36.0/lib/site_perl/5.36.0/Mojolicious/Controller.pm line 154.<br />
# trace] [xx5kwL28OTom] Rendering cached template &#8220;mojo/debug.html.ep&#8221;<br />
Mojo::Reactor::Poll: I/O watcher failed: A response has already been rendered at /home/mojo/perl5/perlbrew/perls/perl-5.36.0/lib/site_perl/5.36.0/Mojolicious/Controller.pm line 154.</p>
<p>As the previous response changing this line make it works:<br />
##   if(&amp;alreadyLoggedIn($self)){<br />
    if($self-&gt;session(&#8216;is_auth&#8217;)){</p>
<p>Hope it save somebody frustration and enjoy your tutorial.<br />
So far is fantastic, easy to understand.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 4): Database Management by Rakshith Chengappa Mullengada		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-308</link>

		<dc:creator><![CDATA[Rakshith Chengappa Mullengada]]></dc:creator>
		<pubDate>Wed, 15 Jun 2022 15:17:24 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=459#comment-308</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-306&quot;&gt;Paul&lt;/a&gt;.

Thanks for your kind words.

1. This article was written with english websites in mind, but good point.
2. You mean assign the value from the hash to a variable for clarity ? Well these articles are written with an intention to get you started with Mojolicious with ease. I guess after that, you would be writing better web apps than what is in this article :) 

Cheers.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-306">Paul</a>.</p>
<p>Thanks for your kind words.</p>
<p>1. This article was written with english websites in mind, but good point.<br />
2. You mean assign the value from the hash to a variable for clarity ? Well these articles are written with an intention to get you started with Mojolicious with ease. I guess after that, you would be writing better web apps than what is in this article 🙂 </p>
<p>Cheers.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 3): Session Management by Rakshith Chengappa Mullengada		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-307</link>

		<dc:creator><![CDATA[Rakshith Chengappa Mullengada]]></dc:creator>
		<pubDate>Wed, 15 Jun 2022 15:06:54 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=431#comment-307</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-305&quot;&gt;Paul&lt;/a&gt;.

Hi Paul,

I looked at your code and found the cause for the issue you are facing. In the latest version of Mojolicious, it forbids you from rendering more than once which was not the case in past. You can check the change log here in the below link. Check version 9.25 comments.

https://metacpan.org/dist/Mojolicious/changes

I tried your code using my old mojolicious docker which has version 9.22 and your code worked like a charm. In case you want to use my docker you can check it here: https://hub.docker.com/r/curioustechnoid/mojolicious

What you can do with the latest Mojolicious is that, use alreadyLoginIn subroutine to render or redirect based on login validation, and don&#039;t render after this subroutine call. That should solve your problem.

Hope this helps.

Cheers!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-305">Paul</a>.</p>
<p>Hi Paul,</p>
<p>I looked at your code and found the cause for the issue you are facing. In the latest version of Mojolicious, it forbids you from rendering more than once which was not the case in past. You can check the change log here in the below link. Check version 9.25 comments.</p>
<p><a href="https://metacpan.org/dist/Mojolicious/changes" rel="nofollow ugc">https://metacpan.org/dist/Mojolicious/changes</a></p>
<p>I tried your code using my old mojolicious docker which has version 9.22 and your code worked like a charm. In case you want to use my docker you can check it here: <a href="https://hub.docker.com/r/curioustechnoid/mojolicious" rel="nofollow ugc">https://hub.docker.com/r/curioustechnoid/mojolicious</a></p>
<p>What you can do with the latest Mojolicious is that, use alreadyLoginIn subroutine to render or redirect based on login validation, and don&#8217;t render after this subroutine call. That should solve your problem.</p>
<p>Hope this helps.</p>
<p>Cheers!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 4): Database Management by Paul		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-4-database-management/#comment-306</link>

		<dc:creator><![CDATA[Paul]]></dc:creator>
		<pubDate>Wed, 15 Jun 2022 07:53:00 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=459#comment-306</guid>

					<description><![CDATA[This tutorial is great , even more approachable than the official tutorial. Thanks for your excellent work.
Add:
1)  Maximium length of VARCHAR in Mariadb is 65535 , but if your datebase character code is UTF8, the limit is 21845 .
2)  $all_testimonials_html in Subroutine loadTestimonials is easy to cause confusion, if don&#039;t write carefully. Therefore, write each group of characters separately, which is more friendly to beginners.]]></description>
			<content:encoded><![CDATA[<p>This tutorial is great , even more approachable than the official tutorial. Thanks for your excellent work.<br />
Add:<br />
1)  Maximium length of VARCHAR in Mariadb is 65535 , but if your datebase character code is UTF8, the limit is 21845 .<br />
2)  $all_testimonials_html in Subroutine loadTestimonials is easy to cause confusion, if don&#8217;t write carefully. Therefore, write each group of characters separately, which is more friendly to beginners.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 3): Session Management by Paul		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-305</link>

		<dc:creator><![CDATA[Paul]]></dc:creator>
		<pubDate>Wed, 15 Jun 2022 01:36:23 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=431#comment-305</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-303&quot;&gt;Rakshith Chengappa Mullengada&lt;/a&gt;.

Of course,  thank you !  I put it here: 

https://github.com/Paul-sinbud2004/Mojolicious_notes/blob/main/xpsweb/lib/xpsweb/Controller/Xpscontroller.pm

The main issue is in line 23 of this file.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-303">Rakshith Chengappa Mullengada</a>.</p>
<p>Of course,  thank you !  I put it here: </p>
<p><a href="https://github.com/Paul-sinbud2004/Mojolicious_notes/blob/main/xpsweb/lib/xpsweb/Controller/Xpscontroller.pm" rel="nofollow ugc">https://github.com/Paul-sinbud2004/Mojolicious_notes/blob/main/xpsweb/lib/xpsweb/Controller/Xpscontroller.pm</a></p>
<p>The main issue is in line 23 of this file.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 3): Session Management by Rakshith Chengappa Mullengada		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-303</link>

		<dc:creator><![CDATA[Rakshith Chengappa Mullengada]]></dc:creator>
		<pubDate>Tue, 14 Jun 2022 09:33:41 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=431#comment-303</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-302&quot;&gt;paul&lt;/a&gt;.

Surprising. The same code that is developed in these articles can be found in GitHub - https://github.com/curioustechnoid/IntroductionToMojolicious
Can you share your code with me, may be I can have a look ?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-302">paul</a>.</p>
<p>Surprising. The same code that is developed in these articles can be found in GitHub &#8211; <a href="https://github.com/curioustechnoid/IntroductionToMojolicious" rel="nofollow ugc">https://github.com/curioustechnoid/IntroductionToMojolicious</a><br />
Can you share your code with me, may be I can have a look ?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 3): Session Management by paul		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-302</link>

		<dc:creator><![CDATA[paul]]></dc:creator>
		<pubDate>Tue, 14 Jun 2022 07:04:04 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=431#comment-302</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-301&quot;&gt;Rakshith Chengappa Mullengada&lt;/a&gt;.

Thanks for your replying. 
  The alreadyLoggedIn function is really useful in terms of reuse. And it works well in the &quot;under&quot; statement.
  But I tried many times, when calling alreadyLoggedIn in sub function displayLogin, the &quot;get /&quot; failed, warns: 

Mojo::Reactor::Poll: I/O watcher failed: A response has already been rendered at /home/paul/perl5/lib/perl5/Mojolicious/Controller.pm line 154.

  So I have to rewrite it like before to make it work. I guess it is caused by the next statement after &quot;return 1&quot;.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-301">Rakshith Chengappa Mullengada</a>.</p>
<p>Thanks for your replying.<br />
  The alreadyLoggedIn function is really useful in terms of reuse. And it works well in the &#8220;under&#8221; statement.<br />
  But I tried many times, when calling alreadyLoggedIn in sub function displayLogin, the &#8220;get /&#8221; failed, warns: </p>
<p>Mojo::Reactor::Poll: I/O watcher failed: A response has already been rendered at /home/paul/perl5/lib/perl5/Mojolicious/Controller.pm line 154.</p>
<p>  So I have to rewrite it like before to make it work. I guess it is caused by the next statement after &#8220;return 1&#8221;.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Comment on Mojolicious (Part 3): Session Management by Rakshith Chengappa Mullengada		</title>
		<link>https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-301</link>

		<dc:creator><![CDATA[Rakshith Chengappa Mullengada]]></dc:creator>
		<pubDate>Tue, 14 Jun 2022 04:41:30 +0000</pubDate>
		<guid isPermaLink="false">https://thecurioustechnoid.com/?p=431#comment-301</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-300&quot;&gt;Paul&lt;/a&gt;.

Hi Paul,

Thank you for visiting the site. The reason for using the function &lt;em&gt;alreadyLoggedIn&lt;/em&gt; is re-usability. The function is already used in the &quot;under&quot; to restrict access to certain parts of the website like testimonials. Keeping this logic in subroutine which can be used in multiple places helps when we want to change the logic in future. In such an event, you just have to change this subroutine and it starts working everywhere.

Cheers!]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://thecurioustechnoid.com/mojolicious-part-3-session-management/#comment-300">Paul</a>.</p>
<p>Hi Paul,</p>
<p>Thank you for visiting the site. The reason for using the function <em>alreadyLoggedIn</em> is re-usability. The function is already used in the &#8220;under&#8221; to restrict access to certain parts of the website like testimonials. Keeping this logic in subroutine which can be used in multiple places helps when we want to change the logic in future. In such an event, you just have to change this subroutine and it starts working everywhere.</p>
<p>Cheers!</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Page Caching using Disk: Enhanced 
Database Caching 20/32 queries in 0.005 seconds using Disk

Served from: thecurioustechnoid.com @ 2026-06-18 22:19:50 by W3 Total Cache
-->