I suppose you're talking about Perl as a server scripting language, delivering WML-pages to WAP enabled devices.

Since it is just a question af MIME-types and content-types to determine what's WML and what not (and what the server serves), one just has to add the correct MIME-Type to the server conf and output pure WML. (Ok, right now, there's no CGI.pm with WAP support, but who knows?)

Add these MIME-types:
AddType text/vnd.wap.wml .wml AddType image/vnd.wap.wbmp .wbmp
to your server conf.

And this would be a small CGI WAP example:
#!/usr/bin/perl -w use CGI qw(:standard); use strict; my $q = new CGI; # This determines being WML or not. print header(-type => 'text/vnd.wap.wml'); print "<?xml version=\"1.0\"?>\n"; print "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http:// +www.wapforum.org/DTD/wml_1.1.xml\">"; # This is the actual WML content. print "<wml>\n"; print "<card id=\"main\" title=\"Hello World\">\n"; print "<p>Hello, " . $q->param("f") . " " . $q->param("l") . "!</p>\n" +; print "</card>\n"; print "</wml>\n";
Update: Just saw ar0n's post, didn't know there's a CGI::WML module. Nice. (But to be honest: who needs WAP anyway?)

In reply to Re: WML and Perl by le
in thread WML and Perl by Spickachu

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.