in reply to Re: Re: Re: Re: Re: (bbfu) (Exporter::VA) Re: Exporter::Dream
in thread Exporter::Dream

Looking at your code, I see that requiring the function names to have no sigil (rather than making it optional) simplifies the code.

It saved me a couple of lines, and a lot of logic, indeed. Since I'm against using sigils on subs, I decided to simply not support them. (Note that of course, when you are referencing a sub, using a sigil is more or less needed (you don't want to type *subname{CODE} all the time :P)). I don't care much about how many lines my code has. But as logic is added, maintainability decreases.

Keeping that note, why have non-functions supported, when by far the most common thing to export is functions.

I quite like for example how LWP::Simple can export $ua. It makes life pleasant. And I can implement it using a few regexes and a hash - no real logic is needed, so I just did. LWP::Simple gave me most inspiration for this module. I usually have it export get and $ua, but I also often use a get and an $ua myself (yes, I do mix LWP::Simple with full blown LWP::UserAgent stuff). It's how I thought of the prefix. It's a shame we use exporters instead of importers, really.

Why isn't Exporter::VA on CPAN yet? I don't know. The powers that be seem to be slow and/or not very clear. It's in my directory, just not indexed.

That's probably because you used a zipfile. Try distributing the module as a gzipped tarball instead. If you use FTP, make sure you upload using binary transfer, not ascii.

I no longer believe in module registration. I registered all of my modules, and none is in the (still manually maintained) module list. Did not get any response at all. Doesn't matter much, since everyone uses search.cpan.org and/or CPAN.pm or CPANPLUS anyway, and modules get added to that index automatically.

- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: Re: (bbfu) (Exporter::VA) Re: Exporter::Dream
by John M. Dlugosz (Monsignor) on Jan 06, 2003 at 21:04 UTC
    So, the index we see in search.cpan.org is not the same "approved only" list that the namespace registration talks about? And you think that this index doesn't like ZIP files, even though PAUSE and the other infrastructure does?

    Thanks for the tip.

    —John

      So, the index we see in search.cpan.org is not the same "approved only" list that the namespace registration talks about? And you think that this index doesn't like ZIP files, even though PAUSE and the other infrastructure does?

      search.cpan.org and the generated module list (used by installers like CPAN and CPANPLUS) have indeed nothing to do with namespace registration. I'm not sure if PAUSE supports zipfiles for distributing modules. I think it does not (you can upload other files, but not all are processed). Maybe PAUSE doesn't support your non-standard installation method, or perhaps you uploaded it using FTP ASCII transfer. I think you'll have to try. Use the log tail to see if your file is processed.

      - Yes, I reinvent wheels.
      - Spam: Visit eurotraQ.
      

        I found it in the FAQ on search.cpan.org. It's not the zipfile, but that they only index things that extract to a single subdirectory.

        I got reports from PAUSE indicating that it works OK. One person had troble testing; said his version didn't like the lack of a top-level directory. Others PASSED, so that must have been fixed or fixed-up by the users. I've downloaded it OK so I know the zip is OK. That's the first thing PAUSE checks is that the archive format is readable and OK. It processed in a second or two and has been in my author directory.

        As for the "standard" install, if they ever get it to work right on Windows... Apparently it is severely alergic to filenames with spaces in them, as it goes deep and isn't easy to fix. The normal place for installing is under \Program Files\... .

        For a module that doesn't need any compiling, I use a "lite" approach since the only thing it needs to do is copy the file to the proper place. I don't know if non-Windows people support PPM.

        —John