How does iBooks determine the category of an EPUB? I've been using the Perl module EBook::EPUB to create ebooks to read in iBooks.  But I can't figure out how to set a category for the books I create.
When I sort by categories in iBooks, it doesn't seem to do anything.  As I understand it, that should show each category as a heading with those books listed underneath it.  But it seems my books don't have categories.

How do I set a category when creating an EPUB book?
You can set the category in iTunes, using the info window (Cmd - i). No need to use Calibre.