Brethren,

I am making Catalyst baby steps. During that struggle I tried to create a custom View component and set up the following code:
package ctest1::View::PDF; use strict; use base 'Catalyst::View'; sub process { print "Content-type: text/plain\n\n"; print "This is a test\n"; return 1; } 1;
The good new with this is, that I see the output of it. The bad news is, there is more than that:
Content-type: text/plain This is a test HTTP/1.0 200 OK Connection: keep-alive Date: Sun, 26 Feb 2006 17:28:38 GMT Set-Cookie: ctest1_session=1bcd798b2ab2d6805ccbc652c6341e39a97e9ef8; p +ath=/; expires=Sun, 26-Feb-2006 19:28:38 GMT Status: 200 X-Catalyst: 5.65
Obviously I am missing something, because I expected the output to be just:
This is a test
What am I doing wrong?


holli, /regexed monk/

In reply to creating a Catalyst View component by holli

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.