> Or you can (simply put) "delete $Foo::Bar::{'Baz::'};". Deleting the
> entire stash
> from that package.
you're sick. sick, sick, sick.
I love it ;)
just out of curiosity, did you try deleting the special glob entries, like
$Foo::Bar::Baz{CODE}?
> +sub module_to_package {
> + my $module = shift;
> + $module =~ s/\//::/g;
> + $module =~ s/\.pm$//g;
> + return $module;
> +}
> +
I've always wondered if this is approach is portable. that is are the keys
in %INC always separated with '/' regardless of the platform? I guess
nobody here has a VMS or EBCDIC machine to test with...
> +void modperl_package2filename(apr_pool_t *p, const char *package,
> + char **filename, int *len)
> +{
> + const char *s;
> + char *d;
> +
>
> + *filename = apr_palloc(p, (strlen(package)+4)*sizeof(char));
> +
>
> + for (s = package, d = *filename; *s; s++, d++) {
> + if (*s == ':' && s[1] == ':') {
> + *d = '/';
> + s++;
> + }
> + else {
> + *d = *s;
> + }
> + }
> + *d++ = '.';
> + *d++ = 'p';
> + *d++ = 'm';
> + *d = '\0';
> +
>
> + *len = d - *filename;
> +}
I know you're just moving this from one place to another, but (again) is
this portable across all platforms, assuming that '/' is the path separator?
I took a look around APR and don't see a generic function for this kind of
thing, though...
> + /* Split the package name on the last '::' */
> + /* Foo::Bar::Baz */
what if you want to unload just Foo and not Foo::Bar? CGI and Digest come
to mind...
other than that, wicked cool!
--Geoff
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]