perl-begin / lib / books.wml

<define-tag get:ext:publisher whitespace="delete">
<ifeq "%0" "oreilly" "<a href="http://www.oreilly.com/">O'Reilly and Associates</a>" />
<ifeq "%0" "manning" "<a href="http://www.manning.com/">Manning Publications Co.</a>" />
<ifeq "%0" "new-riders" "<a href="http://www.newrider.com/">New Riders</a>" />
<ifeq "%0" "wrox" "<a href="http://www.wrox.com/">Wrox Press Inc.</a>" />
<ifeq "%0" "apress" "<a href="http://www.apress.com/">Apress</a>" />
<ifeq "%0" "morgan_kaufmann" "<a href="http://en.wikipedia.org/wiki/Morgan_Kaufmann_Publishers">Morgan Kaufmann Publishers</a>" />
</define-tag>

<define-tag book_store_amazon>
<preserve isbn title />
<set-var %attributes />
<a href="http://www.amazon.com/exec/obidos/ASIN/<get-var isbn />/ref=nosim/shlomifishhom-20/"><get-var title /></a>
<restore isbn title />
</define-tag>

<define-tag book:store>
<preserve isbn />
<preserve store />
<preserve title />
<set-var %attributes />
<ifeq "<get-var store />" "ukamazon"
    "<set-var ucstore="Amazon UK" />"
    "<set-var ucstore="<:{print ucfirst("<get-var store />")}:>" />"
    />
<ifeq "<get-var store />" "amazon"
      "<book_store_amazon %attributes />"
      <group 
            <a href="http://learn.perl.org/redirect?url=book;bookstore=<get-var store />;bookisbn=<get-var isbn />"><get-var title /></a>
      />
      />
<restore title />
<restore store />
<restore isbn />
</define-tag>

<define-tag book:info>
<preserve authors />
<preserve publisher />
<preserve isbn />
<preserve perlbooksid />
<preserve perlbookslink />
<set-var %attributes />
<set-var ext:publisher=<get:ext:publisher <get-var publisher /> /> />
<set-var perlbookslink="<a href="http://books.perl.org/book/<get-var perlbooksid />"><b>Book Page at books.perl.org</b></a><br />" />
<div class="bookinfo">
<h3>Book Information</h3>
<b>Authors:</b> <get-var authors /><br />
<b>Publisher:</b> <get-var ext:publisher /><br />

<if "<get-var perlbooksid />" "<get-var perlbookslink />" "" />
<b>Buy From:</b> 
<book:store isbn="<get-var isbn />" store="amazon" title="Amazon" /> - 
<book:store isbn="<get-var isbn />" store="powells" title="Powells" /> - 
<book:store isbn="<get-var isbn />" store="amazonuk" title="Amazon UK" />
<br />
</div>
<restore perlbookslink />
<restore perbooksid />
<restore isbn />
<restore publisher />
<restore authors />
</define-tag>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.