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

File::ShareDir for config_schema.serge and other non-Perl files #58

Open
prat0088 opened this issue Feb 24, 2017 · 3 comments
Open

File::ShareDir for config_schema.serge and other non-Perl files #58

prat0088 opened this issue Feb 24, 2017 · 3 comments

Comments

@prat0088
Copy link
Contributor

prat0088 commented Feb 24, 2017

When I installed and ran Serge, config_schema.serge is missing causing serge localize to error out. It appears it's not included when installing the module with ./Build install. I also noticed *schema.sql files.

I think the correct way to handle this would be to use share_dir in Build.PL and File::ShareDir.

Are you ok with using File::ShareDir? If so I'll try to put together a pull request.

I haven't forgotten about the tweaks to parse_csv or vcs_p4, but I'm trying to get Serge deployed here before I go back and work on those, hence this issue.

@iafan
Copy link
Contributor

iafan commented Feb 24, 2017

Can you please elaborate on the installation method and OS? For me, following the installation instructions doesn't produce any errors.

@iafan
Copy link
Contributor

iafan commented Feb 24, 2017

Oh, I see you used ./Build install. This is not currently supported. Serge can simply be put into any folder of user's choice.

I will definitely welcome a PR that makes it installable via cpan Serge. Not sure if File::ShareDir is what is needed, though.

@prat0088
Copy link
Contributor Author

Yep, I was trying to use ./Build install.

I think File::ShareDir is the 'proper' way to do this, but when I've used it before it has an unfriendly kink. You must run ./Build and run the program from blib for File::ShareDir to pick up your files. You can't run directly from lib, which is quite common.

I see you're using FILE to get the directory, so I think a simpler method would be to simply copy the static files over using add_build_element('sql'), etc, in Build.PL. This won't require any code change outside of Build.PL and will work consistently during development and after installation.

I made a small change and I'm currently testing that. If it looks good I'll submit a pull request.

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