On the bright side, you can use ListAndEdit to just configure complex webmasks without writing code. For example, here is all i needed to implement the whole of "My NFT":

<module> <modname>xpd_user_nft</modname> <pm>ListAndEdit::Main</pm> <options> <db>maindb</db> <pagetitle>My NFT</pagetitle> <webpath>/xpd/nft/mynft</webpath> <table>xpd.nft</table> <primarykey> <item column="nft_id"/> </primarykey> <orderby>creation_time DESC</orderby> <session>sessionsettings</session> <guess_stats>1</guess_stats> <column_filters>1</column_filters> <candelete>0</candelete> <cancreate>0</cancreate> <useserial>0</useserial> <list> <item header="ID" column="nft_id" type="text"/> <item header="Time" column="creation_time" type="date" +/> <item header="Creator" column="creator" type="text"/> <item header="Title" column="title" type="text"/> <item header="Description" column="description" type=" +text"/> <item header="Image" column="image_data_base64" type=" +image"/> <item header="Price" column="sale_price" type="text"/> <item header="Market" column="sell_on_market" type="bo +olean"/> </list> <edit> <item header="ID" column="nft_id" type="display"/> <item header="Time" column="creation_time" type="displ +ay"/> <item header="Creator" column="creator" type="display" +/> <item header="Title" column="title" type="display"/> <item header="Description" column="description" type=" +display"/> <item header="Image" column="image_data_base64" type=" +imagedisplay"/> <item header="Sell on market" column="sell_on_market" +type="checkbox"/> <item header="Price" column="sale_price" type="number" + value_min="0" value_max="1000000" step="1" hasdecimal="0"/> </edit> <restrict> <item column="owner" value="USER"/> </restrict> </options> </module>

The downside is that it takes a couple of big statemachines and a lot on startup validation&preparation code to make that work. For example, it checks against the configured database table and matches if the configured display/edit type is compatible with the column type.

perl -e 'use Crypt::Digest::SHA256 qw[sha256_hex]; print substr(sha256_hex("the Answer To Life, The Universe And Everything"), 6, 2), "\n";'

In reply to Re^2: XPD - Do more with your PerlMonks XP by cavac
in thread XPD - Do more with your PerlMonks XP by cavac

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.