Skip to content

emka.web.id

writing knowledge, recording civilization

Menu
  • Home
  • Tutorial
  • Search
Menu

Cara Menginstall CPAN Perl Module di Ubuntu

Posted on June 10, 2024

Dunia pemrograman penuh dengan kepraktisan. Seringkali, kita butuh fungsi tertentu yang sudah ada dan tak perlu ditulis ulang. Di sinilah modul Perl berperan!

Modul Perl adalah paket kode Perl yang dapat dipakai ulang. Anda bisa mengintegrasikannya ke program Perl yang sedang dibuat untuk menyelesaikan tugas tertentu. Modul ini mungkin bergantung pada modul Perl lainnya agar berfungsi dengan baik, jadi pastikan semua modul yang dibutuhkan terpasang.

Gudang Raksasa Modul Perl: CPAN

The Comprehensive Perl Archive Network (CPAN) adalah perpustakaan raksasa yang menyimpan lebih dari 200.000 modul Perl! Sebagian besar modul ini membutuhkan versi Perl terbaru, jadi pastikan Perl yang terpasang di sistem Anda sudah diperbarui.

Memasang Modul Perl: Pilih Senjata Anda!

Untuk memasang modul Perl dari CPAN, Anda membutuhkan program perintah khusus. Ada tiga pilihan populer: CPAN CLI, CPAN PLUS, dan CPAN MINUS.

  • CPAN CLI: Sudah termasuk dalam paket Perl (sejak 1997) dan akan memandu Anda melalui beberapa pertanyaan saat pertama kali digunakan. Setelah itu, Anda bisa memasang modul dengan perintah cpan -i NamaModul::.
  • CPAN PLUS: Awalnya bertujuan menjadi program perintah CPAN yang lebih baru, lebih baik, dan lebih kaya fitur, namun pengembangannya tidak dilanjutkan.
  • CPAN MINUS: Alat sederhana yang memudahkan Anda memasang modul Perl. Gunakan perintah cpanm NamaModul:: untuk memasangnya.

CPAN CLI memang yang paling umum digunakan dan sudah terpasang bersama Perl. Tapi, dalam artikel ini, kita akan fokus pada instalasi dan penggunaan CPAN MINUS di Ubuntu 24.04, 23.04, dan versi lainnya.

Panduan Memasang dan Menggunakan CPAN MINUS di Ubuntu

Persiapan:

  1. Perbarui daftar paket:
$ sudo apt update
  1. Instal Perl versi terbaru:
$ sudo apt install perl
  1. Periksa instalasi dengan mengecek versi Perl:
$ perl -v
  1. Instal paket CPAN MINUS untuk memasang modul:
$ sudo apt install cpanminus

Memasang Modul Perl dengan CPAN MINUS

Sekarang, mari kita pasang modul Net::DNS sebagai contoh:

$ sudo cpanm Net::DNS

Lihat Daftar Modul Perl yang Terpasang

Untuk melihat daftar modul Perl yang terpasang dari CPAN, Anda bisa menggunakan perintah perldoc (perlu diinstal) atau instmodsh:

$ perldoc perllocal

# ATAU

$ instmodsh

Namun, cara ini tidak menampilkan modul Perl yang diinstal secara manual atau sudah terpasang bersama distribusi Linux Anda. Untuk melihatnya, gunakan perintah berikut:

$ cpan -l

# ATAU

$ cpan -a

Dunia Perl Menanti!

Dengan modul Perl, Anda bisa memperkaya program dan membuatnya lebih efisien. Selamat mencoba dan terus jelajahi dunia pemrograman yang menarik!

Terbaru

  • Traefik 3.8 New Feature: Yaegi v2 and the Gateway API Finally Make Custom Plugins Worth the Effort
  • Raspberry Pi OS: Why the November Update is a Win for Minimalism
  • React Can useState Hook Explained in 60 Seconds
  • How Do You Build an MMO Solo?
  • NixOS 26.11 “Zokor” Might Be the Most Practical Release for Desktop Power Users Yet
  • Why Your AWS Bill Can Just Tripled Overnight?
  • Why Indonesia’s Battle with Google is a Dangerous Game of Chicken
  • SYS010 Malware Explained: How Malvertising on Meta Bypasses MFA and Hijacks Your Digital Identity
  • Linux Mint 27 Adrien: Why This Version Jump is Make Sense?
  • NFS2ROOT: A 12-Year Reminder That Your Linux Kernel Is Never Truly Safe
  • The Death of Browsing and the Rise of the “Answer Engine Economy”
  • What’s new in Proxmox VE 9.3?
  • Why Your Morning Routine Needs an API: The Art of iOS Automation
  • Proof of Work is the New Certification: 5 AWS Projects to Build Before 2027
  • Omarchy is Our first agentic operating system
  • The Death of Popper.js: Why CSS Anchor Positioning is the New Standard for Connected UI
  • Why Your 2027 Cloud Career Depends on Moving Beyond Basic AWS Services
  • Why Discord is Ditching Electron for Rust: Is GPUi Actually the Future?
  • The End of the KDE Era: Why KaOS 2026.11 Is a Bold, Dangerous Gamble
  • The $2 Billion Code: Why GTA 6 is a Technical Miracle and a Hardware Nightmare
  • LibreDB Studio Explained
  • PHP 8.6 Is Officially Out: What’s New, What Breaks, and How We’re Upgrading
  • Rewriting Legacy Apps: 4 Data Migration Strategies That Actually Work
  • How to Install Clean Windows 11 Without Any Bloatware (Step-by-Step Guide)
  • IP Address Rate Limiting is Flawed—Here is the Right Way to Do It
  • Are Fedora 45 Stuck in Its Comfort Zone? A Short Review
  • Hacktober Recap 2026, A Month Full of Dangerous CVE: eMudhra, Gitlab, Brotli, PHP, NodeJS etc
  • 7 Skill Keamanan Jaringan yang Membuat Network Engineer Makin Dibutuhkan
  • How to Spin Up Disposable macOS and Linux VMs on Apple Silicon with TartVM
  • Belajar Cyber Security dari Nol hingga Siap Kerja, Ini Roadmap Lengkapnya
  • Canonical: Ubuntu coming soon to Snapdragon X2 Series platforms
  • Finally, wolfSSL adds post-quantum algorithms!
  • How to Run Gemma Embedding Models Using Docker
  • Deploy Nginx Rootful Container with Podman
  • How to Sandboxing Browser on Linux Desktop with Flatpak
  • When to use an MCP server vs CLI with DevTools for agents
  • Your MCP Server Is a Search Result Now
  • AI Roadmap: How To Become An Agentic Operations Manager In 2027
  • What Does a Machine Learning Data Scientist Do?
  • How To Use T3 Code

©2026 emka.web.id | Design: Newspaperly WordPress Theme