Skip Menu |

This queue is for tickets about the PDF-API2 CPAN distribution.

Report information
The Basics
Id: 101657
Status: resolved
Priority: 0/
Queue: PDF-API2

People
Owner: Nobody in particular
Requestors: schmorp [...] schmorp.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 2.026



Subject: observation about resource method
Date: Wed, 21 Jan 2015 11:43:40 +0100
To: bug-PDF-API2 [...] rt.cpan.org
From: Marc Lehmann <schmorp [...] schmorp.de>
While perusing the source code for PDF::API2, I saw that the resource method has a peculiar implementation: sub resource { return(undef); my ($self, $type, $key, $obj, $force) = @_; ... lots of dead code i.e. it always returns undef. I haven't checked for any interesting things going on (such as this method somehow being overriden elsewhere), just thought to bring it to your attention in case some debugging code was left over. Greetings, -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / schmorp@schmorp.de -=====/_/_//_/\_,_/ /_/\_\
It looks like it has been this way at least since the code was first put under version control in 2005. I'll leave this ticket open to see if something should get changed, or if the method can just get removed since it's not doing anything.
There doesn't seem to be any need to keep it around without the immediate "return undef", so I've removed it. Individual resources can be added using their respective modules, so this may have been part of an early implementation before the resources got their own modules, perhaps. Who knows. Thanks for pointing out the NOOP!