<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Devel::REPL &#8211; a Perl Read Eval Print Loop</title>
	<atom:link href="http://curiousprogrammer.wordpress.com/2011/01/04/devel-repl/feed/" rel="self" type="application/rss+xml" />
	<link>http://curiousprogrammer.wordpress.com/2011/01/04/devel-repl/</link>
	<description>Leveraging Perl and Emacs</description>
	<lastBuildDate>Sat, 15 Jun 2013 02:12:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Jared</title>
		<link>http://curiousprogrammer.wordpress.com/2011/01/04/devel-repl/#comment-8747</link>
		<dc:creator><![CDATA[Jared]]></dc:creator>
		<pubDate>Tue, 04 Jan 2011 21:34:02 +0000</pubDate>
		<guid isPermaLink="false">http://curiousprogrammer.wordpress.com/?p=1462#comment-8747</guid>
		<description><![CDATA[Hi Sue,

I had always used perl -d -e 1 too.  It looks like there are some advantages to using re.pl if you like that sort of thing though.

@Anonymous - I&#039;ll take a look at those.  Thanks for the tip.

@garu - yes I noticed that the prompt hadn&#039;t changed.  However, clearly the re.pl has done the wrong thing.  I didn&#039;t finish the statement with a semi-colon so it should have been able to detect the continuation.]]></description>
		<content:encoded><![CDATA[<p>Hi Sue,</p>
<p>I had always used perl -d -e 1 too.  It looks like there are some advantages to using re.pl if you like that sort of thing though.</p>
<p>@Anonymous &#8211; I&#8217;ll take a look at those.  Thanks for the tip.</p>
<p>@garu &#8211; yes I noticed that the prompt hadn&#8217;t changed.  However, clearly the re.pl has done the wrong thing.  I didn&#8217;t finish the statement with a semi-colon so it should have been able to detect the continuation.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: garu</title>
		<link>http://curiousprogrammer.wordpress.com/2011/01/04/devel-repl/#comment-8746</link>
		<dc:creator><![CDATA[garu]]></dc:creator>
		<pubDate>Tue, 04 Jan 2011 15:49:11 +0000</pubDate>
		<guid isPermaLink="false">http://curiousprogrammer.wordpress.com/?p=1462#comment-8746</guid>
		<description><![CDATA[The thing is, a single sub declaration is valid Perl code, useful for those rare cases when you have something like a recursive prototyped function. It&#039;s called a &quot;forward&quot; declaration by perlsub.

Simple example (warning! funky code ahead):

perl -Mstrict -Mwarnings -E &#039;sub foo; sub foo; sub foo;&#039;

of course, it&#039;s valid Perl, because you&#039;re just declaring a function, not defining it.

perl -Mstrict -Mwarnings -E &#039;sub foo; sub foo; sub foo; foo(42)&#039;
Undefined subroutine &amp;main::foo called at -e line 1.

And now you probably now what went wrong inside the REPL as well.

The shell prefix should have given you enough of a hint, take a look at how it stays a &quot;$&quot; after you declare your sub:

  $ sub f
  $ {

and changes to a long-call &quot;&gt;&quot; prefix in your latter example:

  $ sub f {
  &gt; say &#039;h&#039;;

what the REPL did on the first try was declare a sub, then go inside a block - just notice how it processes and return the block right after you enter &quot;}&quot;, which does not happen on the second try.

Granted, a REPL specific warning about sub declaration without definition would be very helpful, specially to REPL newcomers.

Anyway, nice article!]]></description>
		<content:encoded><![CDATA[<p>The thing is, a single sub declaration is valid Perl code, useful for those rare cases when you have something like a recursive prototyped function. It&#8217;s called a &#8220;forward&#8221; declaration by perlsub.</p>
<p>Simple example (warning! funky code ahead):</p>
<p>perl -Mstrict -Mwarnings -E &#8216;sub foo; sub foo; sub foo;&#8217;</p>
<p>of course, it&#8217;s valid Perl, because you&#8217;re just declaring a function, not defining it.</p>
<p>perl -Mstrict -Mwarnings -E &#8216;sub foo; sub foo; sub foo; foo(42)&#8217;<br />
Undefined subroutine &amp;main::foo called at -e line 1.</p>
<p>And now you probably now what went wrong inside the REPL as well.</p>
<p>The shell prefix should have given you enough of a hint, take a look at how it stays a &#8220;$&#8221; after you declare your sub:</p>
<p>  $ sub f<br />
  $ {</p>
<p>and changes to a long-call &#8220;&gt;&#8221; prefix in your latter example:</p>
<p>  $ sub f {<br />
  &gt; say &#8216;h&#8217;;</p>
<p>what the REPL did on the first try was declare a sub, then go inside a block &#8211; just notice how it processes and return the block right after you enter &#8220;}&#8221;, which does not happen on the second try.</p>
<p>Granted, a REPL specific warning about sub declaration without definition would be very helpful, specially to REPL newcomers.</p>
<p>Anyway, nice article!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://curiousprogrammer.wordpress.com/2011/01/04/devel-repl/#comment-8745</link>
		<dc:creator><![CDATA[Anonymous]]></dc:creator>
		<pubDate>Tue, 04 Jan 2011 13:24:51 +0000</pubDate>
		<guid isPermaLink="false">http://curiousprogrammer.wordpress.com/?p=1462#comment-8745</guid>
		<description><![CDATA[Sepia and PDE, both available on CPAN, already have REPLs and integrate with Emacs.]]></description>
		<content:encoded><![CDATA[<p>Sepia and PDE, both available on CPAN, already have REPLs and integrate with Emacs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sue D. Nymme</title>
		<link>http://curiousprogrammer.wordpress.com/2011/01/04/devel-repl/#comment-8744</link>
		<dc:creator><![CDATA[Sue D. Nymme]]></dc:creator>
		<pubDate>Tue, 04 Jan 2011 11:36:50 +0000</pubDate>
		<guid isPermaLink="false">http://curiousprogrammer.wordpress.com/?p=1462#comment-8744</guid>
		<description><![CDATA[I always just do &#039;perl -de0&#039; for that sort of thing.]]></description>
		<content:encoded><![CDATA[<p>I always just do &#8216;perl -de0&#8242; for that sort of thing.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
