I am new to Perl and Perl 6. And I cannot accept the Perl 6 module / namespace / package system.
I am working on a library. Say the name of my company MyCompany. And the library is a "category Net. " So what should the file hierarchy look like? Should it be lib/MyCompany/Net/MyLibrary.pm? Or lib/Net/MyLibrary.pm? Or something else?
MyCompany
Net
lib/MyCompany/Net/MyLibrary.pm
lib/Net/MyLibrary.pm
Also, should I override the definition of my class this way?
package MyCompany { class Net::MyLibrary {
:: - , , , CPAN Github. , , , . Perl 5 Perl6. Perl6. - Perl 5 ( class);
::
class
unit class MyCompany;
unit Perl 6, ( , package MyCompany; Perl 5 package ..). , .
unit
package MyCompany;
package ..
class MyCompany { # so begins the MyCompany class method foo { return self; } ## ...other methods } # the end of MyCompany # code from other classes...
, .
, . , . MyLibrary,
MyLibrary
, CPAN, . , MyCompany::. , , - , - .
MyCompany::
, -, CPAN, , Net::, HTML::, Math:: ..
Net::
HTML::
Math::
, , , CPAN. MyCompany:: . Net:: . MyCompany::Net::, MyModule, ,
MyCompany::Net::
MyModule
MyCompany::Net::MyModule, MyCompany/Net/MyModule.pm. ,
MyCompany::Net::MyModule
MyCompany/Net/MyModule.pm
Source: https://habr.com/ru/post/1608955/More articles:Is there a way to selectList without a filter or select options in Persistent Haskell? - haskellcapture video using camera2 and MediaRecorder - androidAjax on rails 4 - jqueryRemoving a path separator at the end of a line - cAngular Material md-datepicker throws an error when clicked - javascriptКак настроить Webpack для вывода активов в определенные каталоги - webpackCreating dynamic forms in angular2 using metadata - angularDifference between disabled bootstrap class and disabled attribute - cssAlign bookmark text in Xamarin forms - xamarinonActivityResult for Facebook and Google+ Sign in to Android - androidAll Articles