Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Inline PAR compatible #54

Closed
zdm opened this issue Jun 1, 2015 · 6 comments
Closed

Make Inline PAR compatible #54

zdm opened this issue Jun 1, 2015 · 6 comments

Comments

@zdm
Copy link

zdm commented Jun 1, 2015

Hi.

Is it possible to make 'lib' suffix in Inline.pm line 927 configurable?

$o->{API}{install_lib} = Spec->catdir($o->{INLINE}{DIRECTORY}, 'lib');

PAR can properly load shared objects from following locations inside archive:

/lib/                           # standard location
/arch/                        # for creating from blib/ 
/i386-freebsd/           # i.e. $Config{archname}
/5.8.0/                       # i.e. Perl version number
/5.8.0/i386-freebsd/  # combination of the two above
/                                # casual packaging only

And hardcoded 'lib' prevent to place Inline data to right arch - dependent location.

If 'lib' will be configurable, I can configure inline dir as '/5.8.0/i386-freebsd/', so 'auto/' dir will be findable by standard perl tools, which looking for 'auto' in @inc.

@mohawk2
Copy link
Collaborator

mohawk2 commented Jun 1, 2015

Take a look at Inline::Module, also by Ingy.

@zdm
Copy link
Author

zdm commented Jun 1, 2015

This is not preferable approach.
I have a project, that use Inline and just want to pack it to PAR directly, without creating and installing intermediate CPAN distribution.

@mohawk2
Copy link
Collaborator

mohawk2 commented Jun 1, 2015

Inline::Module places the generated shared object (aka DLL) into blib/arch. If PAR can't then use that, I will be most surprised.

@zdm
Copy link
Author

zdm commented Jun 1, 2015

Inline::Module is not helpful.
I can manually put generated xs objects everywhere in PAR during build, but problem is that I should write additional loader, that recognize, that project was started from PAR and load xs manually.
So, instead of using standard Inline code everywhere, like:

Inline->import(
    config => (
        directory         => $P->{INLINE_DIR},
        autoname          => 0,
        clean_after_build => 1,
        clean_build_area  => 1,
    )
);

I need to create additional wrappers, like:

if ( $PAR )  {
    # load xs manually, using DynaLoader
}
else {
    # use standard Inline code
}

This will be much more easier for support and maintenance to use standard, well - documented Inline approach everywhere.

@zdm
Copy link
Author

zdm commented Jun 1, 2015

I don't need Inline::Module, because I don't need to build my projects separately before packing to PAR.
I already has xs, built in _Inline dir, and want to pack them together with project working copy.

@zdm zdm closed this as completed May 5, 2016
@zdm
Copy link
Author

zdm commented May 5, 2016

Problem solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants