GithubHelp home page GithubHelp logo

Comments (9)

skx avatar skx commented on September 25, 2024

I did consider making it available via CPAN, but I assumed I'd have to rename it "App::Templer" or similar, and was too distracted to come up with the best namespace. Suggestions welcome on that front.

For installation I guess there are two options:

  • I make it "perl Makefile.PL ; make install", just like a normal CPAN release.
  • I update build-templer to make it simpler for Windows.

I assume the latter doesn't work so well? If I'm mistaken please do let me know what part is hard/failing/surprising to you?

from templer.

zhiyuan-lin avatar zhiyuan-lin commented on September 25, 2024

I think App::Templer is good, just like App::Dapper. build-templer is easy to use but I want to use CPAN to manage my Perl Modules :).

from templer.

skx avatar skx commented on September 25, 2024

And I like just adding one (generated) script to ~/bin on a bunch of hosts!

But yeah I think I'll be migrating to CPAN shortly, and App::Templer will be the name.

from templer.

skx avatar skx commented on September 25, 2024

This work is almost complete now; please see the CPAN branch.

from templer.

skx avatar skx commented on September 25, 2024

Uploaded to CPAN now - it should appear here:

For the moment I see that a .tar.gz file is present here:

from templer.

zhiyuan-lin avatar zhiyuan-lin commented on September 25, 2024

Awesome! I'm waiting for some Chinese mirror to sync ^_^.

from templer.

b3 avatar b3 commented on September 25, 2024

The migration to using CPAN process has allow to clean the code a lot.
Unfortunately it implied that the generated script (bin/templer) can not be used as a standalone script anymore. In order for the script to work now we need the differents Templer:: modules to be accessible via perl outside the script itself and thus they need to be installed somewhere in PERLLIB directories.

So now we cannot just dropped it in a directory and use it as is.

from templer.

b3 avatar b3 commented on September 25, 2024

A "standalone" script can easily be build by some Unix shell commands:

cat $(find lib -type f |grep -v 'Templer/Site/New') bin/templer >bin/templer-standalone
sed -i -e '1i\#!/usr/bin/perl' -e '/^require.*Templer/ d' bin/templer-standalone
chmod +x bin/templer-standalone

I am sure that this is not the cleanest way (it depends on shell and should be a trouble on other systems) but that meets my needs for now.

I however do not know how to add it a clean way in the distribution (some extra Makefile target maybe), nor do I know if it you should add the complete "standalone" script feature back into it.

I just ask.

from templer.

skx avatar skx commented on September 25, 2024

For the moment I've hacked up a simple thing, much along the lines of your version. As you say it's a bit nasty, but the following should do the job:

 perl Makefile.PL ; make standalone

Once you run that you'll have ./templer which is standalone. However the module collision means that ./templer --help will show a lot of rubbish before the real output. I will see if I can improve things before a new release, but I'll commit this just now as an interim step.

from templer.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.