Re: CPAN namespace hierarchy
by GrandFather (Saint) on Jan 24, 2021 at 23:48 UTC
|
After a bunch of digging around on CPAN my thoughts are converging toward ELF::Reader. There is ELF::Writer already and my proposed module is pretty close to a complement to the writer module. My inclination is migrate my interface toward Writer's interface where that makes sense. Comments?
Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
| [reply] |
|
there is also a script "elf.pl" for similar use in Convert::Binary::C, take a look?
I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction
| [reply] |
|
From what I infer from the very light documentation for elf.pl the script may be able to dump structural information, but it doesn't look like it will let me extract data for selected segments. My ultimate goal is to be able to generate update images for a boot loader on an embedded system. The module is just a means to that end. Since I'm writing the code anyway it seemed worth turning it into a CPAN appropriate module.
Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
| [reply] |
Re: CPAN namespace hierarchy
by 1nickt (Canon) on Jan 24, 2021 at 21:53 UTC
|
Hello Grandfather, I remember finding Map of CPAN interesting when I stumbled on it; it shows the top-level spaces but is definitely not a hierarchally ordered rendering!
Hope this helps!
The way forward always starts with a minimal test.
| [reply] |
|
| [reply] |
Re: CPAN namespace hierarchy
by LanX (Saint) on Jan 24, 2021 at 21:59 UTC
|
> Is there a way to browse the CPAN namespace hierarchy?
I'm not sure if I understand the requirement correctly.
Do you mean something like a foldable tree view which is interactively narrowed down while typing a query akin to a CSS selector?
> Maybe I'll just have to put a Tk wrapper around that data ...
If that's the requirement I'd try to feed a JSON hierarchy to one of those many *tree*.js libs in a browser while narrowing down with native "Xpath".
Just brainstorming if these are your requirements.
PS: I know at least one UI framework in JS offering a widget for narrowing down a tree.
| [reply] [d/l] |
|
The end goal is to figure out an appropriate XXX::YYY::ELF::Parser or XXX::YYY::Extract::ELF or some such module name for an ELF file parsing and data extraction module I'm putting together. The immediate driver for the project is to extract application images to be written to flash memory for an embedded system I'm working with at $work. That requires finding 60k of code out of a 6MB ELF file and dumping that into a suitable image to feed a boot loader. Given I haven't found anything useful on CPAN that works on Windows to do that I think it worth a slice of time to wrap the code I'm generating up for CPAN. The hierarchy stuff is just a means to figuring out what XXX, YYY and whatever else might be on that path might be.
Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
| [reply] |
|
You've described your use case.
That could easily be done by filtering the list of modules with a regular expression.
But you mentioned TK, hence you have more requirements than just running some regex.
Without knowing these requirements I can only guess.
(I can't comment on ELF)
For instance:
RAT has a foldable thread/post view.
You could translate those modules into such a tree.
You could use JS / CSS selectors to interactively filter such a tree.
But I don't think you'll invest in this. ;)
If yes you could use the js-console to interactively try it out.
HTH :)
| [reply] |
|
|
|
|
Re: CPAN namespace hierarchy
by Discipulus (Canon) on Jan 24, 2021 at 23:14 UTC
|
Hello GrandFather,
did you missed my masterpiece of hubris? ;)
L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
| [reply] [d/l] |
Re: CPAN namespace hierarchy
by betmatt (Scribe) on Jan 24, 2021 at 22:59 UTC
|
Salve,
I've recently played around with Postgresql and I was surprised to see that it offers class hierarchies for Subjects of the SELECT statements. I don't know about SQLite. I doubt that this offers the same. I really don't know whether this answer is helpful. Some sort of Postgresql emulator might exist? Or maybe a Postgresql cloud solution. I feel that this post is not likely to be helpful, but I write it on the off chance that it is. | [reply] |