Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Choosing namespace/name for (my first) CPAN module which is a sub-class of a well-known distribution

by Anonymous Monk
on Sep 28, 2024 at 12:45 UTC ( [id://11161976]=note: print w/replies, xml ) Need Help??


in reply to Re: Choosing namespace/name for (my first) CPAN module which is a sub-class of a well-known distribution
in thread Choosing namespace/name for (my first) CPAN module which is a sub-class of a well-known distribution

Thanks for advice, you are right about being polite, I'll write to Chris shortly.

Can you sum up in one sentence...

No new functions yet; but smaller final pdf file size because of modern compression; some bugs fixed (no doubt, some added); faster on opening and parsing (and writing), sometimes significantly; somewhat less of a RAM hog.

Long version:

The CAM/PDF.pm contains 133 subroutines; 77 entries are enumerated in API section of the POD (though some of them use wildcards to designate several), and there are 104 methods further described in detail, some marked strictly internal. Plus there are several supporting modules in distribution with quite a few of their own subs. My module, close to 100% complete, has 37 subroutines. Most of them are replacement of originals, either complete re-write or just touched, and some are internal helper subs. No new functions for the end user, actually, at this stage. Added behaviour is triggered using options passed to constructor. Or better let's start with this: I'm planning it to be backward compatible. Whenever someone does:

use CAM::PDF; my $pdf = CAM::PDF->new( $fn_or_stdin_or_pdf, @other_args ); # ... things happen with $pdf

they substitute for my module name and their code works as previously. New features are opt-in, with documented exception. On the external, one such feature is ability to save to 1.5+ version with compressed cross-reference stream and object streams -- thus, smaller file size. No CPAN module can do that, to my knowledge. (Rather, PDF::API2 can append xref stream on incremental update; but it can only update, not save "cleanly" and optimize; file size can only grow. Plus, it's funny to see a screenful or two of your code in "alien" environment, because the patch was written by yours truly.) Slightly less external option is "no slurping on open", but it only matters for really huge input with high resolution images. Typical office or business pdf file size is dwarfed by what CAM::PDF consumes itself. Speaking of which, I changed some of its internal accounting and procedures to improve performance.

  • Comment on Re^2: Choosing namespace/name for (my first) CPAN module which is a sub-class of a well-known distribution
  • Select or Download Code

Replies are listed 'Best First'.
Re^3: Choosing namespace/name for (my first) CPAN module which is a sub-class of a well-known distribution
by Anonymous Monk on Sep 28, 2024 at 17:15 UTC
    Since it's mostly internal and no updated interface and you plan to make it backwards compatible (i.e. any changed behavior is opt-in and no change in prereqs) why not ask permission to take over as the maintainer of the original distribution?
      And possibly changing the name to PDF::CAM and using CAM::PDF as an alias?
Re^3: Choosing namespace/name for (my first) CPAN module which is a sub-class of a well-known distribution
by sleet (Scribe) on Oct 30, 2024 at 11:09 UTC
    one such feature is ability to save to 1.5+ version with compressed cross-reference stream and object streams -- thus, smaller file size
    Hopefully this will be a user configurable option. There are still many systems that only work with the older versions.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11161976]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2025-01-24 16:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (68 votes). Check out past polls.