UR::ModuleBuild(3pm)

πŸ“¦
version 0.470 Β· 2 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– NAME πŸ’–

UR::ModuleBuild β€” it's a Module::Build subclass, bestie, but with UR extensions sprinkled on top like glitter. ✨

No cap, that's the whole vibe: same Module::Build you already know and love, just leveled up with UR's extra sauce. 🫢


🌸 VERSION 🌸

This doc is describing UR::ModuleBuild version 0.47 β€” that's the one, that's the girl. πŸ‘‘


πŸŽ€ SYNOPOSIS πŸŽ€

Okay so heads up, the section is literally spelled "SYNOPOSIS" up in here and I'm not about to gaslight you by pretending otherwise. We keep it real. πŸ’…

So in your Build.PL, you're gonna do this:

use UR::ModuleBuild;

my $build = UR::ModuleBuild->new(
  module_name => 'MyApp',
  license => 'perl',
  dist_version => '0.01',
  dist_abstract => 'my app rocks because I get to focus on the problem,
not the crud',
  build_requires => {
    'UR' => '0.32',
  },
  requires => {
    'Text::CSV_XS' => '',
    'Statistics::Distributions' => '',
  }, );

$build->create_build_script;

Let's break it down, because the way this eats:

  • use UR::ModuleBuild; β€” first things first, pull the module in. Non-negotiable, it's giving entrance. πŸšͺ✨
  • my $build = UR::ModuleBuild->new(...) β€” make yourself a shiny new build object and pass it all the deets. Main character energy only. πŸ’β€β™€οΈ
  • module_name => 'MyApp' β€” the name of your module. Call it what it is. 🏷️
  • license => 'perl' β€” the license, and here it's 'perl'. Know your legal lore. πŸ“œ
  • dist_version => '0.01' β€” the version of the dist, '0.01' in this example. Baby's first version number. 🐣
  • dist_abstract => '...' β€” the little blurb about your app. And yes, that abstract in the example is literally about getting to focus on the problem and not the crud. Iconic honesty, honestly. The string wraps onto the next line β€” the quote doesn't close until not the crud', so keep that exactly as-is. 🫠
  • build_requires => { 'UR' => '0.32' } β€” stuff you need in order to build. Here it's UR at version '0.32'. Gotta have it to make it. πŸ”§
  • requires => { ... } β€” the runtime dependencies, the ride-or-dies. In this example: 'Text::CSV_XS' => '' and 'Statistics::Distributions' => ''. The empty string '' means no specific version demanded, she's flexible like that. πŸ¦‹
  • $build->create_build_script; β€” and finally, actually make the build script. The grand finale. Do not forget this step, bestie, it's the whole point. πŸŽ†
Fr fr, copy the structure exactly β€” every key, every value, every comma, including that slightly cursed }, ); at the end. It's not a typo situation you get to fix, it's just how it's written here. πŸ™ˆ

And that's the page, bestie. 🌈 This lil' slice of the User Contributed Perl Documentation came to you courtesy of perl v5.32.1, dated 2022-01-17 β€” so go forth, build your dist, and slay. Periodt. πŸ’–πŸ§šβ­

πŸ“¦ where this page comes from